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

Support for authenticating service principal with certificate #60

Open
aalim-nisum-com opened this issue May 18, 2020 · 4 comments
Open
Labels
bug Something isn't working

Comments

@aalim-nisum-com
Copy link

aalim-nisum-com commented May 18, 2020

Jenkins version : 2.204.2
azure-keyvault plugin : 2.0
OS: Debian GNU/Linux

I am trying to integrate Jenkins with Azure Key Vault (AKV). I added a service principal in Jenkins credentials. I used Cert method for secret. Once the service principal is added, it verifies successfully.

The next step was to configure the Azure Key vault plugin from main Jenkins configured. I mentioned the Key vault URL and selected the service principal I added in the Jenkins key store. After Hitting the verification "Test Connection" it waits for several seconds and then returns following error
"504 Gateway Time-out"

I tested the same thing with again by defining the same service principal in Jenkins but instead of using the Cert method, I provide Client secret. Using the SPN definition for configuring Azure Key Vault seems to work fine.

Summarizing the issue:
If I use service principal based on CERT to configure Azure Key vault in Jenkins, it returns "504 Gateway Time-out"

@timja timja added the bug Something isn't working label May 18, 2020
@timja
Copy link
Member

timja commented May 18, 2020

Sounds like a bug, I've never used certificates for authentication before

@tarunnallamothu27
Copy link

tarunnallamothu27 commented Jun 10, 2020

@timja any findings on this issue we have been blocked with same kind of issue we are getting same 504 error while using certs

@timja
Copy link
Member

timja commented Jun 10, 2020

I tried implementing it but it's reasonably complex.

possibly someone has done this in another azure credential but I couldn't see it in azure-credentials.

Unless it's contributed by someone it's unlikely to happen right now

@timja timja changed the title Getting Gateway Time-out when use Service Principal Support for authenticating service principal with certificate May 7, 2021
@timja
Copy link
Member

timja commented May 7, 2021

FYI recommended way of integration is with a Managed Identity and not using a service principal itself.

Service principals should be used when not running on Azure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants