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

Add support for using application credentials for authentication #533

Conversation

scornelissen85
Copy link
Contributor

@scornelissen85 scornelissen85 commented Mar 18, 2024

I've used this code for using application credentials for authentication in Openstack. I think it would be valuable if this could be added in the fog-openstack project.

This will fix issue #510

This can be used as alternative next to it's original credentials options. To use application credentials I've set the following parameters:

compute_client = Fog::Compute.new  :openstack_auth_url => ENV['OS_AUTH_UR'],
                                    :openstack_application_credential_secret => ENV['OS_APPLICATION_CREDENTIAL_SECRET'],
                                    :openstack_application_credential_id => ENV['OS_APPLICATION_CREDENTIAL_ID']

CC @dhague (sorry if I should cc another member)

@scornelissen85 scornelissen85 changed the title Add initial support for using application credentials for auth Add support for using application credentials for authentication Mar 19, 2024
@geemus
Copy link
Member

geemus commented Mar 19, 2024

Looks good overall.

Unfortunately the test suite has been busted for a bit here, other maintainers haven't really been active, and I don't have an active openstack setup to test against either.

Have you been able to test this out successly?

@scornelissen85
Copy link
Contributor Author

scornelissen85 commented Mar 19, 2024

Looks good overall.

Thank you

Unfortunately the test suite has been busted for a bit here, other maintainers haven't really been active, and I don't have an active openstack setup to test against either.

I have tried to add a test, that was succesfull, but I saw there were tests failing, even without my change.

Have you been able to test this out successly?

Yes, I'm using the branch with these changes with success and only use application credentials to log in in Openstack. I'm using my branch currently from beaker-openstack where the Compute and the Network class is used directly. I'm not sure if something is missing as I'm not using anything other than those classes.

Furthermore, I'm not an expert about the communication with Openstack. This change works for me, but I can't guarantee it works for other cases.

@geemus
Copy link
Member

geemus commented Mar 19, 2024

Thanks for the context, that makes sense to me. The change to nil would be great and then I think we can bring this in. You can only speak for your own experience, but from what I see it shouldn't break anything that is currently working for others either way.

@scornelissen85
Copy link
Contributor Author

I have changes scope to return nil when using application credentials and it seems to work.

@scornelissen85 scornelissen85 force-pushed the feature/add-support-for-application-credentials branch from 09ca4a4 to 2a4e5da Compare March 20, 2024 09:27
@geemus
Copy link
Member

geemus commented Mar 20, 2024

Great, thanks for that.

@geemus geemus merged commit be1d005 into fog:master Mar 20, 2024
0 of 5 checks passed
@geemus
Copy link
Member

geemus commented Mar 20, 2024

@scornelissen85 did you need a release with this change?

@scornelissen85
Copy link
Contributor Author

@geemus If you could make a release I can then make a PR for beaker-openstack to use the application credentials.

fmoehler pushed a commit to fmoehler/fog-openstack that referenced this pull request May 6, 2024
…#533)

* Add initial support for using application credentials for auth

* Add spec test for using application credentials

* Add application credentials options to identity

* Return nil from scope if application credential is used
jochenehret added a commit to sap-contributions/fog-openstack that referenced this pull request Jun 5, 2024
* Swift supports application credentials: restic/restic#2156
* see also fog#533
geemus pushed a commit that referenced this pull request Jun 12, 2024
* Swift supports application credentials: restic/restic#2156
* see also #533
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