-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Generate database access credentials with tctl auth sign command #10785
Merged
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b797d59
feat(tctl): sign command to generate database access credentials
gabrielcorado b0302d9
feat(tctl): make auth sign parameters app-name and db-name mutually e…
gabrielcorado af424f4
feat(tctl): add flag db-user to auth sign command
gabrielcorado 9645eb6
test(tctl): remove references to deprecated package ioutil
gabrielcorado 5f115e5
test(tctl): update test to check error type
gabrielcorado 49b7a1d
chore(tctl): add godoc to `getDatabaseServer` function
gabrielcorado 7238937
Merge branch 'master' into gabrielcorado/tctl-sign-databases
gabrielcorado eb326ff
Merge branch 'master' into gabrielcorado/tctl-sign-databases
gabrielcorado 66902bb
refactor(tctl): rename database-related flags in auth sign
gabrielcorado 49bcbfd
Merge branch 'master' into gabrielcorado/tctl-sign-databases
gabrielcorado 618fecc
refactor(tctl): rename flag from `db` to `db-service`
gabrielcorado 592bc6b
Merge branch 'master' into gabrielcorado/tctl-sign-databases
gabrielcorado File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Right now we are using
--db-name
to provide the name od database instance where intsh login/connect
the--db-name
refers to a database name scheme. For example:This might be unintuitive also in current approach also the
Database
field is not set in:so there is no way to specify the --db-name to connect in case of postgres access where databaseName is used.
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.
That's an interesting point, but it is hard to name the
ServiceName
property into something else since in some places (like the UI and the command you mentioned), it is called "database name".What about setting the flags like this:
--db
: Refers to theServiceName
property fromRouteToDatabase
;--db-name
: Refers to theDatabase
property fromRouteToDatabase
;--db-user
: Refers to theUsername
property fromRouteToDatabase
;Another question related to this: is the parameter (
Database
) required only in some database types? if so should we add validation to it (for example, if PostgreSQL requires it, we make the flag required)?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.
Agree, the
--db-name
is a bit misleading because and it should be somehow distinguishable fromRouteToDatabase.ServiceName
a new flog--db
or--db-service
should fix this and to allow to provide fullRouteToDatabase
information@r0mant Any objection ?
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.
Sorry for delay here guys, yeah I think
--db-service
,--db-user
and--db-name
makes sense.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.
Done. Updated the flags.