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

API cleanup #47

Merged
merged 3 commits into from
Mar 24, 2023
Merged

API cleanup #47

merged 3 commits into from
Mar 24, 2023

Conversation

jnschaeffer
Copy link
Contributor

This PR removes most functionality that isn't strictly necessary to accomplish permissions checking and resource registration. In particular, the following changes were made:

  • Global scope has been removed
  • Resource updates have been removed
  • API endpoints to check reachable resources have been removed
  • SpiceDB schema has been simplified (mostly to make it easier to generate it using resources automatically in future iterations)

Some or all of this functionality may be added back in future PRs as needs dictate. For now, the goal is primarily to start with what we believe we need and build out from there. Manual testing shows that permissions checks resolve as expected.

Roles are to be tenant-scoped by design for MVP. We can consider
adding global scope in the future, but for now to keep things simple
we're just going to have tenant roles.

Signed-off-by: John Schaeffer <[email protected]>
Checking the available resources for a given subject isn't in scope
for MVP, so we're removing it for now. Since it's in history we should
be able to pull this back in if/as needed.

Signed-off-by: John Schaeffer <[email protected]>
To simplify things further for MVP, resource update has been removed
and the schema has been substantially simplified. Built-in roles are
good, and we should support them, but just to keep things simple for
now they have been removed. We can reintroduce them once we're
confident in the design so far.

Signed-off-by: John Schaeffer <[email protected]>
@JAORMX JAORMX merged commit 2a8817a into infratographer:main Mar 24, 2023
JAORMX added a commit to JAORMX/permissions-api that referenced this pull request Mar 24, 2023
A recent PR (infratographer#47)
simplified the API endpoints and schema. This reflects the change in the
client by removing the API calls that are no longer applicable.

This also removes the explicit setting of the token in favor of using a
ready-to-go http.Client instance such as the one that
https://pkg.go.dev/golang.org/x/oauth2#section-readme may provide.

Signed-off-by: Juan Antonio Osorio <[email protected]>
@jnschaeffer jnschaeffer deleted the mvp-api branch March 24, 2023 12:06
jnschaeffer pushed a commit that referenced this pull request Mar 24, 2023
A recent PR (#47)
simplified the API endpoints and schema. This reflects the change in the
client by removing the API calls that are no longer applicable.

This also removes the explicit setting of the token in favor of using a
ready-to-go http.Client instance such as the one that
https://pkg.go.dev/golang.org/x/oauth2#section-readme may provide.

Signed-off-by: Juan Antonio Osorio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants