@campxdev/server-shared 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sts.service.d.ts","sourceRoot":"","sources":["../../../src/media/services/sts.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sts.service.d.ts","sourceRoot":"","sources":["../../../src/media/services/sts.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,qBACa,UAAU;IAIT,OAAO,CAAC,QAAQ,CAAC,aAAa;IAH1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+B;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;gBAET,aAAa,EAAE,aAAa;IAazD;;OAEG;IACG,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;;;;;CA8BvD"}
|
|
@@ -14,32 +14,21 @@ exports.STSService = void 0;
|
|
|
14
14
|
const client_sts_1 = require("@aws-sdk/client-sts");
|
|
15
15
|
const common_1 = require("@nestjs/common");
|
|
16
16
|
const config_1 = require("@nestjs/config");
|
|
17
|
-
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
18
17
|
let STSService = STSService_1 = class STSService {
|
|
19
18
|
configService;
|
|
20
19
|
logger = new common_1.Logger(STSService_1.name);
|
|
21
20
|
stsClient;
|
|
22
21
|
constructor(configService) {
|
|
23
22
|
this.configService = configService;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
// In production/ECS, explicitly use ECS credentials to bypass environment variables
|
|
38
|
-
this.stsClient = new client_sts_1.STSClient({
|
|
39
|
-
region: this.configService.get('AWS_REGION'),
|
|
40
|
-
credentials: (0, credential_providers_1.fromContainerMetadata)(),
|
|
41
|
-
});
|
|
42
|
-
}
|
|
23
|
+
this.logger.log(`STSService initialized - using campxServiceUser credentials`);
|
|
24
|
+
// Always use environment credentials (campxServiceUser) for simplified integration
|
|
25
|
+
this.stsClient = new client_sts_1.STSClient({
|
|
26
|
+
region: this.configService.get('AWS_REGION'),
|
|
27
|
+
credentials: {
|
|
28
|
+
accessKeyId: this.configService.get('AWS_ACCESS_KEY_ID'),
|
|
29
|
+
secretAccessKey: this.configService.get('AWS_SECRET_ACCESS_KEY'),
|
|
30
|
+
},
|
|
31
|
+
});
|
|
43
32
|
}
|
|
44
33
|
/**
|
|
45
34
|
* Assume role and return AWS credentials for S3Client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sts.service.js","sourceRoot":"","sources":["../../../src/media/services/sts.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAmE;AACnE,2CAAoD;AACpD,2CAA+C;
|
|
1
|
+
{"version":3,"file":"sts.service.js","sourceRoot":"","sources":["../../../src/media/services/sts.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAmE;AACnE,2CAAoD;AACpD,2CAA+C;AAGxC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAIQ;IAHZ,MAAM,GAAG,IAAI,eAAM,CAAC,YAAU,CAAC,IAAI,CAAC,CAAC;IACrC,SAAS,CAAY;IAEtC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QACvD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;QAE/E,mFAAmF;QACnF,IAAI,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC;YAC7B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC;YAC5C,WAAW,EAAE;g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,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,KAAK,YAAY,EAAE,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;CACF,CAAA;AAlDY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAKiC,sBAAa;GAJ9C,UAAU,CAkDtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/server-shared",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Campx server shared files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"@aws-sdk/client-secrets-manager": "^3.734.0",
|
|
29
29
|
"@aws-sdk/client-sqs": "^3.693.0",
|
|
30
30
|
"@aws-sdk/client-sts": "^3.490.0",
|
|
31
|
-
"@aws-sdk/credential-providers": "^3.883.0",
|
|
32
31
|
"@aws-sdk/s3-request-presigner": "^3.873.0",
|
|
33
32
|
"@azure/msal-node": "^3.6.3",
|
|
34
33
|
"@golevelup/nestjs-discovery": "^4.0.1",
|