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

Ability to authenticate against OpenStack with application credentials or token #776

Merged
merged 8 commits into from
Feb 7, 2022

Conversation

laurentganne
Copy link
Contributor

@laurentganne laurentganne commented Jan 12, 2022

Pull Request description

Description of the change

In some environments, like in LEXIS project, Yorc must be able to allocate OpenStack compute resources on behalf of any user created on demand by a third party AAI (Authentication and Authorization Infrastructure), Yorc being just given an OpenStack token or Openstack application credentials, valid only for a given time defined by the third party AAI.

Added the ability for Yorc to authenticate against OpenStack using a token or application credentials, that are provided in a node template metadata (not in yorc static configuration as these are per user values with a validity defined by an external AAI.

What I did

doc/configuration.rst

In the table of OpenStack parameters,
added parameter domain_id to be used with tokens, and referencing a note for user_name and password.
The note added below the table specifies that a token or application credentials can be specified in a node template, when user/password authentication can't be used.

tosca/constants.go
Added constants for token and application credentials keys that can be define in a node template metadata

prov/terraform/openstack/generator.go

When setting OpenStack parameters used for authentication, checking if application credentials are defined in the node template metadata to use them during the authentication,
else do a token-based authentication if a toekn is defined, else do the user/password authentication like previously.

How to verify it

Verified on a LEXIS setup, using both:

Description for the changelog

Ability to authenticate against OpenStack with token or application credentials (GH-775)

Applicable Issues

Closes #775

@sonarcloud
Copy link

sonarcloud bot commented Feb 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

89.6% 89.6% Coverage
0.0% 0.0% Duplication

Copy link
Member

@loicalbertin loicalbertin left a comment

Choose a reason for hiding this comment

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

LGTM 👍 👏

@laurentganne laurentganne merged commit 15eacc8 into develop Feb 7, 2022
@laurentganne laurentganne deleted the feature/GH-775-aai-creds branch February 7, 2022 10:07
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.

Add ability to authenticate to OpenStack with token or application credentials provided by third party
2 participants