Skip to content
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

feat(policy): 1421 tech debt migrate Resource Mappings object queries to sqlc #1422

Merged

Conversation

ryanulit
Copy link
Contributor

@ryanulit ryanulit commented Aug 22, 2024

closes #1421

also implements:

  • architecture decisions per adr readme
  • recent audit improvements

@ryanulit ryanulit marked this pull request as ready for review August 23, 2024 22:08
@ryanulit ryanulit requested review from a team as code owners August 23, 2024 22:08
@ryanulit ryanulit requested a review from a team as a code owner August 29, 2024 20:04
@jrschumacher jrschumacher added the comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry) label Sep 6, 2024
@jrschumacher jrschumacher marked this pull request as draft September 6, 2024 16:44
@ryanulit ryanulit marked this pull request as ready for review October 1, 2024 22:59
jakedoublev
jakedoublev previously approved these changes Oct 2, 2024
@jakedoublev
Copy link
Contributor

It looks like the test in otdfctl is failing as a result of these changes, but it's a change on the CLI side that's needed. We should do a GET before DELETE for helpful CLI output so the test passes instead of relying on the DELETE db call to populate the full context of what was deleted from the RPC response.

https://github.com/opentdf/otdfctl/blob/c7eafb986a89e14e2baeea84cab68fe748cea51f/cmd/policy-resourceMappings.go#L134-L146
https://github.com/opentdf/otdfctl/blob/main/pkg/handlers/resourceMappings.go#L68

ryanulit added a commit to opentdf/otdfctl that referenced this pull request Oct 2, 2024
…or cli output (#398)

Due to changes made in opentdf/platform#1422 to
only return an object with the ID for delete operations, we need to
update the otdfctl Resource Mapping delete operation to make a Get
request from the DB before deletion of the record. The object returned
from the Get is then used for the user-friendly CLI output of the whole
object.
@ryanulit ryanulit added this pull request to the merge queue Oct 2, 2024
Merged via the queue into main with commit cd74bcf Oct 2, 2024
20 checks passed
@ryanulit ryanulit deleted the feat/1421-migrate-resource-mapping-object-queries-to-sqlc branch October 2, 2024 20:32
github-merge-queue bot pushed a commit that referenced this pull request Oct 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.4.25](service/v0.4.24...service/v0.4.25)
(2024-10-15)


### Features

* **authz:** Add name to entity id when retrieved from token
([#1616](#1616))
([5304204](5304204))
* **core:** Add entity category to audit logs
([#1614](#1614))
([871878c](871878c))
* **core:** Change log level from Debug to Trace for readiness checks
([#1544](#1544))
([0af1269](0af1269)),
closes [#1545](#1545)
* **policy:** 1004 add audit support for unsafe actions
([#1620](#1620))
([4b64e5b](4b64e5b))
* **policy:** 1357 policy GetAttributeByFqn db query should employ fewer
roundtrips ([#1633](#1633))
([0bdb7e5](0bdb7e5)),
closes [#1357](#1357)
* **policy:** 1421 tech debt migrate Resource Mappings object queries to
sqlc ([#1422](#1422))
([cd74bcf](cd74bcf))
* **policy:** 1426 tech debt migrate Namespace object queries to sqlc -
PART 2 ([#1617](#1617))
([b914350](b914350))
* **policy:** 1434 tech debt migrate attribute value object queries to
sqlc ([#1444](#1444))
([0a7998e](0a7998e)),
closes [#1434](#1434)
* **policy:** 1435 tech debt migrate attribute definition object queries
to sqlc ([#1450](#1450))
([c36624c](c36624c))
* **policy:** 1436 tech debt migrate subject mapping and condition set
object queries to sqlc
([#1606](#1606))
([ec60c9f](ec60c9f))
* **policy:** 1438 tech debt migrate attribute fqn indexing queries to
sqlc ([#1445](#1445))
([617aa91](617aa91)),
closes [#1438](#1438)
* **policy:** 1580 Resource Mappings GET/LIST should provide attribute
value FQNs in response
([#1622](#1622))
([e33bcc0](e33bcc0)),
closes [#1580](#1580)
* **policy:** 1618 update KAS CRUD to align with ADR decisions
([#1619](#1619))
([379f980](379f980)),
closes [#1618](#1618)
* **policy:** DSP-51 - deprecate PublicKey local field
([#1590](#1590))
([e3ed0b5](e3ed0b5))
* **sdk:** Improve KAS key lookup and caching
([#1556](#1556))
([fb6c47a](fb6c47a))


### Bug Fixes

* allow standard users to get authorization decisions
([#1634](#1634))
([718f5e3](718f5e3))
* **authz:** Move logs containing subject mappings to trace level
([#1635](#1635))
([80c117c](80c117c)),
closes [#1503](#1503)
* **core:** Autobump service
([#1611](#1611))
([2567052](2567052))
* **core:** Autobump service
([#1624](#1624))
([9468479](9468479))
* **core:** Autobump service
([#1639](#1639))
([0551247](0551247))
* **core:** Autobump service
([#1654](#1654))
([ecf41e9](ecf41e9))
* **core:** log audit object as json
([#1612](#1612))
([c519ffb](c519ffb))
* Simplify request ID extraction from context for AUDIT
([#1626](#1626))
([2f7518c](2f7518c))

---
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
Labels
comp:policy Policy Configuration ( attributes, subject mappings, resource mappings, kas registry)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Resource Mapping object queries to sqlc
3 participants