Skip to content

Conversation

@wbreza
Copy link
Contributor

@wbreza wbreza commented Nov 3, 2022

Addresses #408

  • Adds request builders to manage federated identity credentials (fics) to Azure AD Graph applications.
  • Adds new --auth-type flag for azd pipeline config. Valid values: federated, client-credentials
  • Defaults github auth to Federated
  • Updates Github pipeline provider for Federated support

When auth type is Federated in a valid configuration, azd will create a federated identity credential on the new/updated service principal for the following subjects:

  • repo:${REPO}:ref:refs/heads/main
  • repo:${REPO}:pull_request

References

Pipeline providers

Github

Auth Default: Federated
Supported Auth: Federated, ClientCredentials

Github secret configuration is different between Federated and ClientCredentials. The github workflow has been setup to test which secrets have been defined and then use the correct version of the az login command.

Azure DevOps

Auth Default: ClientCredentials
Supported Auth: ClientCredentials

Display error if --auth-type is explicitly set to Federated**(not supported)**

Provision Providers

Bicep

Auth Default: Federated
Supported Auth: Federated, ClientCredentials

Terraform

Auth Default: ClientSecret
Supported Auth: ClientCredentials

Display warning if --auth-type isn't defined (falling back to ClientCredentials)
Display error if --auth-type is explicitly set to Federated**(not supported)**

@ghost ghost assigned wbreza Nov 3, 2022
@wbreza wbreza changed the title Adds FederatedIdentityCredentials request builders to Graph Client Adds FederatedIdentityCredentials (FICS) request builders to Graph Client Nov 3, 2022
@weikanglim
Copy link
Contributor

Do you have a link to the issue that describes the requirements? Are we creating the oidc application or are we using one that is user-provided?

@wbreza wbreza added this to the Backlog milestone Nov 7, 2022
@wbreza
Copy link
Contributor Author

wbreza commented Nov 7, 2022

Do you have a link to the issue that describes the requirements? Are we creating the oidc application or are we using one that is user-provided?

Mentioned issue #408

@wbreza wbreza marked this pull request as ready for review November 7, 2022 22:23
Copy link
Member

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Tested on Windows and todo-java-mongo. Works great!

@azure-sdk
Copy link
Collaborator

Repoman Generation Results

Repoman pushed changes to remotes for the following projects:

Project: todo-csharp-cosmos-sql

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-cosmos-sql -b pr/1086

View Changes | Compare Changes


Project: todo-csharp-sql-swa-func

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-sql-swa-func -b pr/1086

View Changes | Compare Changes


Project: todo-csharp-sql

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-csharp-sql -b pr/1086

View Changes | Compare Changes


Project: todo-java-mongo-aca

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-java-mongo-aca -b pr/1086

View Changes | Compare Changes


Project: todo-java-mongo

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-java-mongo -b pr/1086

View Changes | Compare Changes


Project: todo-nodejs-mongo-aca

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-nodejs-mongo-aca -b pr/1086

View Changes | Compare Changes


Project: todo-nodejs-mongo-swa-func

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-nodejs-mongo-swa-func -b pr/1086

View Changes | Compare Changes


Project: todo-nodejs-mongo

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-nodejs-mongo -b pr/1086

View Changes | Compare Changes


Project: todo-python-mongo-aca

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-aca -b pr/1086

View Changes | Compare Changes


Project: todo-python-mongo-swa-func

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-swa-func -b pr/1086

View Changes | Compare Changes


Project: todo-python-mongo

Remote: azure-samples-staging

Branch: pr/1086

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo -b pr/1086

View Changes | Compare Changes


@azure-sdk
Copy link
Collaborator

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:

curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086 --version '' --verbose

pwsh:

Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086' -Version '' -Verbose

Windows

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/1086' -Version '' -Verbose;"

Standalone Binary

Container

docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-1086

Copy link
Member

@ellismg ellismg left a comment

Choose a reason for hiding this comment

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

Awesome to see this coming online! Code changes look great. A small question about the pipeline configuration. Excited for our secret-less future!

Copy link
Member

@vhvb1989 vhvb1989 left a comment

Choose a reason for hiding this comment

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

Awesome! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants