Skip to content

Going secretless for Azure DevOps access - #376

Merged
BillWagner merged 29 commits into
mainfrom
going-secretless
Aug 7, 2026
Merged

Going secretless for Azure DevOps access#376
BillWagner merged 29 commits into
mainfrom
going-secretless

Conversation

@BillWagner

Copy link
Copy Markdown
Member

First draft at using secretless authentication for Azure Dev Ops access.

@IEvangelist IEvangelist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Comment thread actions/sequester/ImportIssues/Program.cs Outdated
Comment thread actions/sequester/ImportIssues/Program.cs Outdated
@BillWagner
BillWagner force-pushed the going-secretless branch 2 times, most recently from cc35898 to 7411f20 Compare July 19, 2024 19:23
@BillWagner
BillWagner force-pushed the going-secretless branch 2 times, most recently from ce72ac9 to 23773dd Compare July 29, 2024 15:37
@BillWagner
BillWagner force-pushed the going-secretless branch 3 times, most recently from 09b5bf0 to 2641047 Compare August 15, 2024 21:16
@BillWagner
BillWagner force-pushed the going-secretless branch 2 times, most recently from e486e67 to bfc561e Compare September 13, 2024 14:22
Copilot AI review requested due to automatic review settings June 25, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR is a first pass at enabling “secretless” Azure DevOps authentication for the sequester tooling by introducing an Azure DevOps bearer access token path (OIDC/OAuth) alongside the existing PAT-based flow.

Changes:

  • Add a new QuestAccessToken option sourced from environment variables and workflow OIDC output.
  • Thread a useBearerToken flag through service construction and update QuestClient to support Bearer vs Basic auth headers.
  • Update the bulk workflow to acquire an Azure DevOps OIDC token and pass it to the action.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
actions/sequester/Quest2GitHub/QuestGitHubService.cs Adds useBearerToken, but currently still constructs the AzDO client with QuestKey regardless (blocks secretless auth).
actions/sequester/Quest2GitHub/Options/EnvironmentVariableReader.cs Reads new QuestAccessToken and makes PAT optional, creating a mismatch with ApiKeys.QuestKey being required.
actions/sequester/Quest2GitHub/Options/ApiKeys.cs Introduces QuestAccessToken, but its XML docs are currently incorrect/misleading.
actions/sequester/Quest2GitHub/AzDoClientServices/QuestClient.cs Supports Bearer auth, but adds response-body logging and double-reads the content (security/robustness issue).
actions/sequester/ImportIssues/Program.cs Wires through useBearerToken and validates token presence; also adds an unused using.
.github/workflows/quest-bulk.yml Adds Azure DevOps OIDC auth step and passes QuestAccessToken; pins sequester action to a feature branch ref.
Comments suppressed due to low confidence (1)

actions/sequester/Quest2GitHub/Options/EnvironmentVariableReader.cs:31

  • QuestKey is now read as optional, but ApiKeys.QuestKey is still declared as a required non-nullable string. That combination can produce null values at runtime (the reader returns value!) and makes it unclear which token is actually required. Consider making QuestKey nullable (and validating based on auth mode) or requiring it only when bearer auth isn’t used.
        var azureAccessToken = CoalesceEnvVar(("ImportOptions__ApiKeys__AzureAccessToken", "AZURE_ACCESS_TOKEN"), false);

        // This key is the PAT for Quest access. It's now a legacy key. Secretless should be better.
        var questKey = CoalesceEnvVar(("ImportOptions__ApiKeys__QuestKey", "QuestKey"), false);

        if (!int.TryParse(appIDString, out int appID)) appID = 0;

        return new ApiKeys()
        {
            GitHubToken = githubToken,
            QuestAccessToken =  questToken,
            AzureAccessToken = azureAccessToken,
            QuestKey = questKey,
            SequesterPrivateKey = oauthPrivateKey,
            SequesterAppID = appID

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread actions/sequester/Quest2GitHub/QuestGitHubService.cs Outdated
Comment thread actions/sequester/Quest2GitHub/AzDoClientServices/QuestClient.cs
Comment thread actions/sequester/Quest2GitHub/Options/ApiKeys.cs
Comment thread actions/sequester/Quest2GitHub/AzDoClientServices/QuestClient.cs
Comment thread actions/sequester/ImportIssues/Program.cs
Comment thread .github/workflows/quest-bulk.yml

@BillWagner BillWagner left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This looks good. Let's go over it and then I'll get this merged and deployed.

Comment thread .github/workflows/quest.yml Outdated
Comment thread .github/workflows/quest.yml Outdated
@ramiMSFT

ramiMSFT commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

This looks good. Let's go over it and then I'll get this merged and deployed.

Thanks @BillWagner! Let me know if you have any other suggestions

This will now run on the main branch.
@BillWagner
BillWagner marked this pull request as ready for review August 6, 2026 21:36
@BillWagner
BillWagner requested a review from a team as a code owner August 6, 2026 21:36
Comment thread .github/workflows/quest-bulk.yml
@BillWagner
BillWagner merged commit 0369bf6 into main Aug 7, 2026
1 check passed
@BillWagner
BillWagner deleted the going-secretless branch August 7, 2026 15:27
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.

5 participants