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 Service Principal with certificate (no password) #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zioproto
Copy link
Collaborator

@zioproto zioproto commented Mar 4, 2024

Purpose

To support the CodeSpaces scenario: In case you can't create a Service Principal with password (for example because of tenant policy) you need to create a Service Principal with certificate.

Does this introduce a breaking change?

[ ] Yes
[ X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[X ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Create a service principal with certificate:

az ad sp create-for-rbac --role="Owner" --scopes="/subscriptions/<SUBSCRIPTION_ID>" --create-cert -o json

Populate the CodeSpace secrets:

ARM_CLIENT_ID
ARM_CLIENT_SECRET
ARM_TENANT_ID

The certificate secret must be populated like this:

ARM_CLIENT_CERTIFICATE=$(cat cert-and-private-key.pem| base64)

Follow the tutorial steps in the Readme.

@zioproto zioproto force-pushed the service-principal-certificate branch 2 times, most recently from 634d0ce to 4300456 Compare March 4, 2024 15:18
@zioproto zioproto force-pushed the service-principal-certificate branch from 4300456 to eb25c70 Compare March 4, 2024 15:26
.devcontainer/script.sh Show resolved Hide resolved
.devcontainer/script.sh Show resolved Hide resolved
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