Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 215
direct: Add support for secret scopes#3886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
bbd0a4bbf86538df29329b16328a0da6f68a4ac665b1e7a45ba52db8559ca0adf9c9f537e7e227ad9d050b8aca6cdec26a50af43a1cc1283ae2be0fbf90ffdd8565d3979795407c9b0ddef2450700dd4a46a1ea6b23e59e9a98a75e6342b3fc53266b43a123ed281446a8d84783eb2e9855f24ab930e9452e1b491522887d21d1afeb71e4c26f29e6229a17dbfbc6959c3e809364d6da18bd49050bd6ccebdb11cb7c5d35e083ed52e33133f29fb8ec307c2aaa8e185af7277b4d2fbd317bd12c39e0c66d7a207bdb9236b836eb8283a5689a7892947e1c917File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,2 @@ | ||
| trace $CLI bundle deploy | ||
| trace jq -s '.[] | select(.path=="/api/2.0/secrets/scopes/create") | .body' out.requests.txt | ||
| rm out.requests.txt | ||
| trace print_requests.py //secrets |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,11 @@ | ||
| bundle: | ||
| name: deploy-secret-scope-test-$UNIQUE_NAME | ||
| name: secret-scope-basic-$UNIQUE_NAME | ||
| resources: | ||
| secret_scopes: | ||
| secret_scope1: | ||
| my_scope: | ||
| name: $SECRET_SCOPE_NAME | ||
| backend_type: "DATABRICKS" | ||
| permissions: | ||
| - user_name: admins | ||
| - user_name: deco-test-user@databricks.com | ||
| level: WRITE | ||
| - user_name: users | ||
| level: READ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "plan": { | ||
| "resources.secret_scopes.my_scope": { | ||
| "action": "create", | ||
| "new_state": { | ||
| "value": { | ||
| "scope": "test-scope-[UNIQUE_NAME]-1", | ||
| "scope_backend_type": "DATABRICKS" | ||
| } | ||
| } | ||
| }, | ||
| "resources.secret_scopes.my_scope.permissions": { | ||
| "depends_on": [ | ||
| { | ||
| "node": "resources.secret_scopes.my_scope", | ||
| "label": "${resources.secret_scopes.my_scope.name}" | ||
| } | ||
| ], | ||
| "action": "create", | ||
| "new_state": { | ||
| "value": { | ||
| "scope_name": "", | ||
| "acls": [ | ||
| { | ||
| "permission": "MANAGE", | ||
| "principal": "[USERNAME]" | ||
| }, | ||
| { | ||
| "permission": "WRITE", | ||
| "principal": "deco-test-user@databricks.com" | ||
| } | ||
| ] | ||
| }, | ||
| "vars": { | ||
| "scope_name": "${resources.secret_scopes.my_scope.name}" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "plan": { | ||
| "resources.secret_scopes.my_scope": { | ||
| "action": "create" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| { | ||
| "plan": { | ||
| "resources.secret_scopes.my_scope": { | ||
| "action": "recreate", | ||
| "new_state": { | ||
| "value": { | ||
| "scope": "test-scope-[UNIQUE_NAME]-2", | ||
| "scope_backend_type": "DATABRICKS" | ||
| } | ||
| }, | ||
| "changes": { | ||
| "local": { | ||
| "scope": { | ||
| "action": "recreate", | ||
| "old": "test-scope-[UNIQUE_NAME]-1", | ||
| "new": "test-scope-[UNIQUE_NAME]-2" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "resources.secret_scopes.my_scope.permissions": { | ||
| "depends_on": [ | ||
| { | ||
| "node": "resources.secret_scopes.my_scope", | ||
| "label": "${resources.secret_scopes.my_scope.name}" | ||
| } | ||
| ], | ||
| "action": "update_id", | ||
| "new_state": { | ||
| "value": { | ||
| "scope_name": "", | ||
| "acls": [ | ||
| { | ||
| "permission": "MANAGE", | ||
| "principal": "[USERNAME]" | ||
| }, | ||
| { | ||
| "permission": "WRITE", | ||
| "principal": "deco-test-user@databricks.com" | ||
| } | ||
| ] | ||
| }, | ||
| "vars": { | ||
| "scope_name": "${resources.secret_scopes.my_scope.name}" | ||
| } | ||
| }, | ||
| "remote_state": { | ||
| "scope_name": "test-scope-[UNIQUE_NAME]-1", | ||
| "acls": [ | ||
| { | ||
| "permission": "WRITE", | ||
| "principal": "deco-test-user@databricks.com" | ||
| }, | ||
| { | ||
| "permission": "MANAGE", | ||
| "principal": "[USERNAME]" | ||
| } | ||
| ] | ||
| }, | ||
| "changes": { | ||
| "local": { | ||
| "scope_name": { | ||
| "action": "update_id", | ||
| "old": "test-scope-[UNIQUE_NAME]-1", | ||
| "new": "" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "plan": { | ||
| "resources.secret_scopes.my_scope": { | ||
| "action": "recreate" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "plan": { | ||
| "resources.secret_scopes.my_scope": { | ||
| "action": "skip", | ||
| "remote_state": { | ||
| "backend_type": "DATABRICKS", | ||
| "name": "test-scope-[UNIQUE_NAME]-2" | ||
| } | ||
| }, | ||
| "resources.secret_scopes.my_scope.permissions": { | ||
| "depends_on": [ | ||
| { | ||
| "node": "resources.secret_scopes.my_scope", | ||
| "label": "${resources.secret_scopes.my_scope.name}" | ||
| } | ||
| ], | ||
| "action": "skip", | ||
| "remote_state": { | ||
| "scope_name": "test-scope-[UNIQUE_NAME]-2", | ||
| "acls": [ | ||
| { | ||
| "permission": "WRITE", | ||
| "principal": "deco-test-user@databricks.com" | ||
| }, | ||
| { | ||
| "permission": "MANAGE", | ||
| "principal": "[USERNAME]" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "plan": { | ||
| "resources.secret_scopes.my_scope": { | ||
| "action": "skip" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/scopes/delete", | ||
| "body": { | ||
| "scope": "test-scope-[UNIQUE_NAME]-1" | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/scopes/create", | ||
| "body": { | ||
| "scope": "test-scope-[UNIQUE_NAME]-2", | ||
| "scope_backend_type": "DATABRICKS" | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/acls/put", | ||
| "body": { | ||
| "permission": "WRITE", | ||
| "principal": "deco-test-user@databricks.com", | ||
| "scope": "test-scope-[UNIQUE_NAME]-2" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/acls/delete", | ||
| "body": { | ||
| "principal": "deco-test-user@databricks.com", | ||
| "scope": "test-scope-[UNIQUE_NAME]-1" | ||
| } | ||
| } | ||
shreyas-goenka marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/scopes/delete", | ||
| "body": { | ||
| "scope": "test-scope-[UNIQUE_NAME]-1" | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/scopes/create", | ||
| "body": { | ||
| "scope": "test-scope-[UNIQUE_NAME]-2", | ||
| "scope_backend_type": "DATABRICKS" | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/secrets/acls/put", | ||
| "body": { | ||
| "permission": "WRITE", | ||
| "principal": "deco-test-user@databricks.com", | ||
| "scope": "test-scope-[UNIQUE_NAME]-2" | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This aliases the other permissions block.
I can see this being a potential issue. Especially because one of them is a slice and the other an object.
@denik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow, what's the issue? The interface is still the same as other resources:
This bit comes from the
[dresources.SecretScopeAclsState]struct which is an internal state used to map the permissions schema to the ACLs schema needed by secret scopes.