-
Notifications
You must be signed in to change notification settings - Fork 12
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
IAPL schema generation #106
Conversation
Signed-off-by: John Schaeffer <[email protected]>
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.
Looks like a good start to me - just a few comments so far.
internal/iapl/policy.go
Outdated
return &out | ||
} | ||
|
||
func (v *policy) validateTypeAliases() error { |
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.
check for a nil
policy? here and below?
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.
In general I don't like to do nil checks for pointer receivers unless there's a legitimate reason they could be nil. In this case there isn't, so a panic would be the expected result for me if someone tried to call validateTypeAliases()
on a nil policy.
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Co-authored-by: E Camden Fisher <[email protected]> Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
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 reran the tests, looks like they are still failing - otherwise lgtm 👍
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
Signed-off-by: John Schaeffer <[email protected]>
This PR updates permissions-api to use the Infratographer authorization policy language (final name TBD) as defined in this design document: https://gist.github.com/jnschaeffer/29df29ee3fc8aca905cafb45919e9843
The overall goal here is to move towards an external policy being provided to permissions-api, then modified with some resources like roles and subjects that permissions-api needs to do its job. Some work in that realm that is explicitly out of scope for this PR:
These items will be addressed in subsequent PRs.