-
Notifications
You must be signed in to change notification settings - Fork 24
feat(policy): register unsafe service in platform #1066
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eletes are 'unsafe' actions)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 2, 2024
…on (#1067) 5th PR for #115 Makes all RPC names on the unsafe services also start with Update to drive the casbin action definition matching logic: [main/service/internal/auth/authn.go#L289-L290](https://github.com/opentdf/platform/blob/main/service/internal/auth/authn.go?rgh-link-date=2024-07-02T00%3A18%3A56Z#L289-L290) Splitting out from #1066 due to the need to publish `/protocol/go` module dependency for consumption upstream in `service` and `sdk` modules. --------- Co-authored-by: David Mihalcik <[email protected]>
jrschumacher
requested changes
Jul 2, 2024
Member
jrschumacher
left a comment
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.
Would you update the example config to propagate the new default?
jrschumacher
approved these changes
Jul 2, 2024
This was referenced Jul 2, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 2, 2024
🤖 I have created a release *beep* *boop* --- ## [0.2.6](protocol/go/v0.2.5...protocol/go/v0.2.6) (2024-07-02) ### Features * **policy:** register unsafe service in platform ([#1066](#1066)) ([b7796cd](b7796cd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 2, 2024
🤖 I have created a release *beep* *boop* --- ## [0.4.8](service/v0.4.7...service/v0.4.8) (2024-07-02) ### Features * **policy:** add index to fqn column in attribute_fqns table ([#1035](#1035)) ([1b0cf38](1b0cf38)), closes [#1053](#1053) * **policy:** add unsafe attribute RPC db connectivity ([#1022](#1022)) ([fbc02f3](fbc02f3)) * **policy:** attribute values unsafe actions db connectivity ([#1030](#1030)) ([4a30426](4a30426)) * **policy:** register unsafe service in platform ([#1066](#1066)) ([b7796cd](b7796cd)) ### Bug Fixes * **authz:** Return deny on GetDecision if resource attribute lookup returns not found ([#962](#962)) ([7dea640](7dea640)) * **core:** Autobump service ([#1072](#1072)) ([409df67](409df67)) * **core:** Autobump service ([#1079](#1079)) ([10138d2](10138d2)) * **core:** Autobump service ([#1084](#1084)) ([968883e](968883e)) * **core:** database clients pooling improvements ([#1047](#1047)) ([8193cec](8193cec)) * **core:** swap out internal issuer for external issuer endpoint ([#1027](#1027)) ([c3828d0](c3828d0)) * **core:** update casbin policy to allow authorization service ([#1041](#1041)) ([552e970](552e970)) * **policy:** provide ns and val fqns back on list attributes response ([#1050](#1050)) ([1be04f6](1be04f6)), closes [#1052](#1052) * **policy:** rename unsafe rpcs for aligned casbin action determination ([#1067](#1067)) ([7861e4a](7861e4a)) * **policy:** run migrations on db only once for all policy services ([#1040](#1040)) ([db4f06f](db4f06f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
jakedoublev
added a commit
that referenced
this pull request
Jul 7, 2024
Relates to #115 Closes #115 Drives authorization with existing casbin action definition matching logic: https://github.com/opentdf/platform/blob/main/service/internal/auth/authn.go#L289-L290 Middleware casbin tests (with local `test-admin` client given the `admin` role for validation): ```shell time=2024-07-01T17:16:31.618-07:00 level=INFO msg="enforcing policy" subject=role:admin resource=policy.unsafe.UnsafeService/UnsafeUpdateNamespace action=unsafe time=2024-07-01T17:16:31.618-07:00 level=WARN msg="permission denied" azp=b007dc27-e9a5-493b-8d2d-b26a92a6752c error="permission denied" ``` ```shell time=2024-07-01T17:18:08.028-07:00 level=INFO msg="enforcing policy" subject=role:standard resource=policy.unsafe.UnsafeService/UnsafeUpdateNamespace action=unsafe time=2024-07-01T17:18:08.028-07:00 level=WARN msg="permission denied" azp=d8949062-977b-498a-a640-61865d633121 error="permission denied" ``` ```shell time=2024-07-01T17:18:30.518-07:00 level=INFO msg="enforcing policy" subject=role:org-admin resource=policy.unsafe.UnsafeService/UnsafeUpdateNamespace action=unsafe time=2024-07-01T17:18:30.519-07:00 level=DEBUG msg=sql sql="SELECT opentdf_policy.attribute_namespaces.id, opentdf_policy.attribute_namespaces.name, opentdf_policy.attribute_namespaces.active, JSON_STRIP_NULLS(JSON_BUILD_OBJECT('labels', metadata->'labels', 'created_at', created_at, 'updated_at', updated_at)) AS metadata, opentdf_policy.attribute_fqns.fqn FROM opentdf_policy ..... ```
jakedoublev
pushed a commit
that referenced
this pull request
Jul 7, 2024
🤖 I have created a release *beep* *boop* --- ## [0.2.6](protocol/go/v0.2.5...protocol/go/v0.2.6) (2024-07-02) ### Features * **policy:** register unsafe service in platform ([#1066](#1066)) ([b7796cd](b7796cd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
jakedoublev
pushed a commit
that referenced
this pull request
Jul 7, 2024
🤖 I have created a release *beep* *boop* --- ## [0.4.8](service/v0.4.7...service/v0.4.8) (2024-07-02) ### Features * **policy:** add index to fqn column in attribute_fqns table ([#1035](#1035)) ([1b0cf38](1b0cf38)), closes [#1053](#1053) * **policy:** add unsafe attribute RPC db connectivity ([#1022](#1022)) ([fbc02f3](fbc02f3)) * **policy:** attribute values unsafe actions db connectivity ([#1030](#1030)) ([4a30426](4a30426)) * **policy:** register unsafe service in platform ([#1066](#1066)) ([b7796cd](b7796cd)) ### Bug Fixes * **authz:** Return deny on GetDecision if resource attribute lookup returns not found ([#962](#962)) ([7dea640](7dea640)) * **core:** Autobump service ([#1072](#1072)) ([409df67](409df67)) * **core:** Autobump service ([#1079](#1079)) ([10138d2](10138d2)) * **core:** Autobump service ([#1084](#1084)) ([968883e](968883e)) * **core:** database clients pooling improvements ([#1047](#1047)) ([8193cec](8193cec)) * **core:** swap out internal issuer for external issuer endpoint ([#1027](#1027)) ([c3828d0](c3828d0)) * **core:** update casbin policy to allow authorization service ([#1041](#1041)) ([552e970](552e970)) * **policy:** provide ns and val fqns back on list attributes response ([#1050](#1050)) ([1be04f6](1be04f6)), closes [#1052](#1052) * **policy:** rename unsafe rpcs for aligned casbin action determination ([#1067](#1067)) ([7861e4a](7861e4a)) * **policy:** run migrations on db only once for all policy services ([#1040](#1040)) ([db4f06f](db4f06f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #115
Closes #115
Drives authorization with existing casbin action definition matching logic: https://github.com/opentdf/platform/blob/main/service/internal/auth/authn.go#L289-L290
Middleware casbin tests (with local
test-adminclient given theadminrole for validation):