-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update TokenConfig and add JWT models #2
Conversation
Update TokenConfig model to reflect expected database schema Refactor AccessRoles values to allow for more in-between values Add methods to read/dump PermissionsConfig to JWT-compatible role strings
…omment Update unit test to account for token config change
Add test coverage for TokenConfig
After some integration testing, having separate |
Refactor `HanaToken` to include params previously used in `TokenConfig`
Annotate fields of HanaToken
… validation results Update unit tests to account for token changes
ADMIN = 6 | ||
# 7-8 Reserved for "restricted owners" | ||
OWNER = 9 | ||
# 10 Reserved for "unlimited access" |
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.
10 seems like a fairly small number, might want to consider something larger like 50 or 100 for "unlimited access". Food for thought, since you haven't defined it here it's not necessarily relevant for this PR
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 was considering that too.. My main concern is that a very large range could make troubleshooting permissions more complicated, though restricting it to enumerated values does obviate that for the most part
Description
Add BaseModel for JWT and
HanaToken
(to use for auth and refresh)Update TokenConfig model to reflect expected database schema
Refactor AccessRoles values to allow for more in-between values
Add methods to read/dump PermissionsConfig to JWT-compatible role strings
Issues
Relates to NeonGeckoCom/neon-hana#33
Other Notes
This includes a breaking change to
TokenConfig
which has yet to be implemented anywhere; this change establishes the configuration that will be written to user databasesThis includes a potentially breaking change to
AccessRoles
. If used as documented, this change will not affect behavior