-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add improved secret management #301
Conversation
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.
overall this looks good to me, my only real question would be if we currently allow users to provide custom roles via a scoped secret and this change would then break them.
930cea0
to
8675352
Compare
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.
Looking good, just have one more question on backwards compatibility.
Are we doing a major version release for the new shell? If so perhaps we could just drop a note on that specific case and just call it a day.
return new Secret({ key, allowScope: !key.includes(":") }); | ||
} | ||
|
||
static parse(key: string) { |
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.
does the 'current' shell allow you to have endpoints in your file that are scoped?
[endpoint.child]
secret=secret:child:admin
secret=secret:child:@role/myrole
maybe we don't care? just trying to think through if this could lead to backwards incompatible changes for users and where we draw the line on that.
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.
the current shell lets you do that, but it will break if you set a database path in fauna eval
or fauna shell
. It seems like something we ought to just disallow.
77b1c44
to
0fd9144
Compare
0fd9144
to
4c6d798
Compare
Ticket(s): ENG-5635
Adds a
Secret
helper class, which manages a scoped secret.This makes it so that
fauna shell <scope>
will append the given scope to the scope in your project file. The behavior is a little weird:Note that it says "connected to database foo/bar", and then says "Starting shell for database bar."
Not sure if we want to fix this or not, but I think its fine as-is.