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

Document how to use Workflow Identity Federation #426

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

Conversation

BillyONeal
Copy link
Member

Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2046511/

I am unable to actually try this end to end myself as recent policy enforcement on the vcpkg team's Azure Subscription renders some of the actions a user needs to do here impossible. However, I did verify that the SAS token generation bits do reasonable things with my SC-ALT account.

Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2046511/

I am unable to actually try this end to end myself as recent policy enforcement on the vcpkg team's Azure Subscription renders some of the actions a user needs to do here impossible. However, I did verify that the SAS token generation bits do reasonable things with my SC-ALT account.
Copy link

@BillyONeal : Thanks for your contribution! The author(s) have been notified to review your proposed change. @bion

Copy link
Contributor

Learn Build status updates of commit 6ae487d:

✅ Validation status: passed

File Status Preview URL Details
vcpkg/consume/caching-workflow-identity-federation.md ✅Succeeded View
vcpkg/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Comment on lines 108 to 115
In the yml where you wish to invoke vcpkg in Azure DevOps, use the AzureCLI@2 task to mint a SAS
token and invoke vcpkg, for example:

::: zone pivot="shell-cmd"

Generating the end date with cmd is impractical; please choose powershell or bash.

::: zone-end
Copy link
Contributor

@JavierMatosD JavierMatosD Nov 12, 2024

Choose a reason for hiding this comment

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

Suggested change
In the yml where you wish to invoke vcpkg in Azure DevOps, use the AzureCLI@2 task to mint a SAS
token and invoke vcpkg, for example:
::: zone pivot="shell-cmd"
Generating the end date with cmd is impractical; please choose powershell or bash.
::: zone-end
::: zone pivot="shell-cmd"
>[!NOTE]
>Generating the end date with cmd is impractical. Please choose PowerShell or Bash.
::: zone-end

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, maybe we should explain what we mean by choosing PowerShell of Bash.

Comment on lines 117 to 119
::: zone pivot="shell-powershell"

```yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
::: zone pivot="shell-powershell"
```yaml
::: zone pivot="shell-powershell"
In the yml where you wish to invoke vcpkg in Azure DevOps, use the AzureCLI@2 task to mint a SAS
token and invoke vcpkg, for example:
```yaml

Ditto below. I think that will look cleaner if the user has cmd selected.

Copy link
Contributor

Learn Build status updates of commit 733cd61:

⚠️ Validation status: warnings

File Status Preview URL Details
vcpkg/consume/caching-workflow-identity-federation.md ⚠️Warning View Details
vcpkg/TOC.yml ✅Succeeded View

vcpkg/consume/caching-workflow-identity-federation.md

  • Line 17, Column 1: [Warning: h1-not-first - See documentation] Markdown content is not allowed before H1 'Tutorial: Set up caching using Azure Storage and Azure DevOps'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit aa6660f:

✅ Validation status: passed

File Status Preview URL Details
vcpkg/consume/caching-workflow-identity-federation.md ✅Succeeded View
vcpkg/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

> [!WARNING]
> These instructions grant permission to act as the managed identity to the pipelines where it is
> used. Moreover, vcpkg caches provide a mechanism where a compromised build may be able cause
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> used. Moreover, vcpkg caches provide a mechanism where a compromised build may be able cause
> used. Moreover, vcpkg caches provide a mechanism where a compromised build may be able to cause

named `vcpkg-docs-identity-connection`. At this point, Azure DevOps should be showing an issuer
and subject identifier.

In another tab, to the Azure Portal navigate to the managed identity created in step 1. On the left
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's something wrong with this sentence, but I'm not entirely sure what was intended here.

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.

3 participants