@fishawack/lab-env 4.36.0 → 4.37.0
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.
- package/CHANGELOG.md +12 -0
- package/commands/create/cmds/key.js +1 -1
- package/commands/create/services/aws/iam.js +15 -5
- package/core/1/CHANGELOG.md +6 -0
- package/core/1/entrypoint.sh +3 -0
- package/core/1/package.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 4.37.0 (2024-10-22)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* added fullstack permission type that attaches eb permissions ([f98ccaa](https://bitbucket.org/fishawackdigital/lab-env/commits/f98ccaa600f6417e1bf0764ea45f2c512c438ecd))
|
|
8
|
+
* permissions now accepted for IAM users to narrow down access ([507eceb](https://bitbucket.org/fishawackdigital/lab-env/commits/507ecebbabd2feb2d9ced604975a5f86ca9c1aaa))
|
|
9
|
+
|
|
10
|
+
#### Build Updates
|
|
11
|
+
|
|
12
|
+
* bumped nodemailer to fix punycode deprecation warning ([db4fd29](https://bitbucket.org/fishawackdigital/lab-env/commits/db4fd294fc39e0455e30319f796f3813f65c2bdc))
|
|
13
|
+
* **core/1:** Bumped lab-env-core-1 ([6d706a9](https://bitbucket.org/fishawackdigital/lab-env/commits/6d706a95e09d75de8758a5b8703056ace009191e))
|
|
14
|
+
|
|
3
15
|
### 4.36.0 (2024-10-08)
|
|
4
16
|
|
|
5
17
|
#### Features
|
|
@@ -85,7 +85,7 @@ module.exports = [
|
|
|
85
85
|
credentials[user] = {};
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
let res = await aws.iam.createFWIAMUser(`fw-automation-${user}`, client);
|
|
88
|
+
let res = await aws.iam.createFWIAMUser(`fw-automation-${user}`, client, _.config.users.find(d => d.username === user).permissions);
|
|
89
89
|
|
|
90
90
|
credentials[user][client] = {
|
|
91
91
|
key: res.AccessKey && res.AccessKey.AccessKeyId || res.AccessKeyMetadata[0].AccessKeyId,
|
|
@@ -24,10 +24,10 @@ module.exports.createIAMUser = async (UserName, account, tags = []) => {
|
|
|
24
24
|
return res;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
module.exports.createFWIAMUser = async (UserName, account) => {
|
|
27
|
+
module.exports.createFWIAMUser = async (UserName, account, permissions) => {
|
|
28
28
|
await module.exports.createIAMUser(UserName, account);
|
|
29
29
|
|
|
30
|
-
await module.exports.syncFWIAMPolicies(UserName, account);
|
|
30
|
+
await module.exports.syncFWIAMPolicies(UserName, account, permissions);
|
|
31
31
|
|
|
32
32
|
let res = await module.exports.createAccessKeySafe(UserName, account);
|
|
33
33
|
|
|
@@ -73,10 +73,20 @@ module.exports.attachIAMPolicy = async (UserName, account, policy) => {
|
|
|
73
73
|
return res;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
module.exports.syncFWIAMPolicies = async (UserName, account) => {
|
|
76
|
+
module.exports.syncFWIAMPolicies = async (UserName, account, permissions = ["auto-content", "deploy-static"]) => {
|
|
77
77
|
await module.exports.removeAllIAMPolicies(UserName, account);
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
|
|
79
|
+
if(permissions.includes("auto-content") || permissions.includes("deploy-static")){
|
|
80
|
+
await module.exports.attachIAMPolicy(UserName, account, 'arn:aws:iam::aws:policy/AmazonS3FullAccess');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if(permissions.includes("deploy-static")){
|
|
84
|
+
await module.exports.attachIAMPolicy(UserName, account, 'arn:aws:iam::aws:policy/CloudFrontFullAccess');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if(permissions.includes("deploy-fullstack")){
|
|
88
|
+
await module.exports.attachIAMPolicy(UserName, account, 'arn:aws:iam::aws:policy/AdministratorAccess-AWSElasticBeanstalk');
|
|
89
|
+
}
|
|
80
90
|
};
|
|
81
91
|
|
|
82
92
|
module.exports.removeIAMPolicy = async (UserName, account, policy) => {
|
package/core/1/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 1.6.0 (2024-10-22)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* own global node_modules folder so local modules can be linked ([82f84fa](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/82f84faa5dfa7c009458bec4fe3a9f2b437c34bf))
|
|
8
|
+
|
|
3
9
|
### 1.5.2 (2024-10-08)
|
|
4
10
|
|
|
5
11
|
#### Bug Fixes
|
package/core/1/entrypoint.sh
CHANGED
|
@@ -8,6 +8,9 @@ if [ -z "$FW_ROOT" ]; then
|
|
|
8
8
|
# Own the node_modules folder otherwise it'll be owned by root/previous node id which will prevent writing
|
|
9
9
|
chown node /app/node_modules
|
|
10
10
|
|
|
11
|
+
# Own the global node_modules folder otherwise it'll be owned by root/previous node id which will prevent writing
|
|
12
|
+
chown node /usr/local/lib/node_modules
|
|
13
|
+
|
|
11
14
|
# Default arguments will always be bash -l, if nothing follows this just start an non login interactive shell
|
|
12
15
|
if [ -z "${@:3}" ]; then
|
|
13
16
|
exec su node
|
package/core/1/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "lab-env docker config for the @fishawack/core/1 npm module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"image": "docker buildx build --ssh default --platform linux/amd64,linux/arm64 -t fishawack/lab-env-core-1:$npm_package_version -t fishawack/lab-env-core-1:latest --push . && docker buildx build --ssh default --target alpine --platform linux/amd64,linux/arm64 -t fishawack/lab-env-core-1-alpine:$npm_package_version -t fishawack/lab-env-core-1-alpine:latest --push ."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishawack/lab-env",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.37.0",
|
|
4
4
|
"description": "Docker manager for FW",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"glob": "7.1.7",
|
|
36
36
|
"inquirer": "8.1.2",
|
|
37
37
|
"lodash": "^4.17.21",
|
|
38
|
-
"nodemailer": "^6.
|
|
38
|
+
"nodemailer": "^6.9.15",
|
|
39
39
|
"ora": "5.4.1",
|
|
40
40
|
"semver": "7.3.4",
|
|
41
41
|
"update-notifier": "^6.0.2",
|