(accessKey, userName)
| 67 | } |
| 68 | |
| 69 | function makeAuthInfo(accessKey, userName) { |
| 70 | const canIdMap = { |
| 71 | accessKey1: '79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7' |
| 72 | + 'cd47ef2be', |
| 73 | accessKey2: '79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7' |
| 74 | + 'cd47ef2bf', |
| 75 | lifecycleKey1: '0123456789abcdef/lifecycle', |
| 76 | default: crypto.randomBytes(32).toString('hex'), |
| 77 | }; |
| 78 | canIdMap[constants.publicId] = constants.publicId; |
| 79 | const acctIdMap = { |
| 80 | accessKey1: '123456789098', |
| 81 | accessKey2: '234567890987', |
| 82 | default: 'shortid', |
| 83 | }; |
| 84 | const shortid = acctIdMap[accessKey] || acctIdMap.default; |
| 85 | const params = { |
| 86 | canonicalID: canIdMap[accessKey] || canIdMap.default, |
| 87 | shortid, |
| 88 | email: `${accessKey}@l.com`, |
| 89 | accountDisplayName: `${accessKey}displayName`, |
| 90 | arn: `arn:aws:iam::${shortid}:root`, |
| 91 | }; |
| 92 | |
| 93 | if (userName) { |
| 94 | params.IAMdisplayName = `${accessKey}-${userName}-userDisplayName`; |
| 95 | params.arn = `arn:aws:iam::${shortid}:user/${userName}`; |
| 96 | } |
| 97 | |
| 98 | return new AuthInfo(params); |
| 99 | } |
| 100 | |
| 101 | class WebsiteConfig { |
| 102 | constructor(indexDocument, errorDocument, redirectAllReqTo) { |
no outgoing calls
no test coverage detected