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

'machine' authentication to impersonate users through a shared secret #2028

Merged
merged 3 commits into from
Sep 1, 2021

Conversation

gmgigi96
Copy link
Member

@gmgigi96 gmgigi96 commented Sep 1, 2021

This PR adds a new authentication provider, called machine, in order to impersonate
an user through a shared secret, stored in the reva configuration.

Example:

$ reva -insecure -host localhost:19000 login  -username einstein -api-key qwerty123 machine
OK
$ reva -insecure -host localhost:19000 whoami
id:<idp:"localhost:20080" opaque_id:"4c510ada-c86b-4815-8820-42cdf82c3d51" type:USER_TYPE_PRIMARY > username:"einstein" mail:"einstein@example.org" display_name:"Albert Einstein" groups:"sailing-lovers" groups:"violin-haters" groups:"physics-lovers" 
$ reva -insecure -host localhost:19000 login  -username marie -api-key qwerty123 machine
OK
$ reva -insecure -host localhost:19000 whoami
id:<idp:"localhost:20080" opaque_id:"f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c" type:USER_TYPE_PRIMARY > username:"marie" mail:"marie@example.org" display_name:"Marie Curie" groups:"radium-lovers" groups:"polonium-lovers" groups:"physics-lovers"

// in a config file.

type manager struct {
ApiKey string `mapstructure:"api_key"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmgigi96 easy one to fix

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