Code Monkey home page Code Monkey logo

Comments (10)

jessehouwing avatar jessehouwing commented on July 1, 2024 2

Hmmm and thinking about it, it probably also needs agentpool:read on the organization that is configured for the later added built-in tasks functionality.

I'll fork, verify and document

from azure-devops-marketplace.

rarkins avatar rarkins commented on July 1, 2024

Can you remind me how/when this token was set up? We should document this if it's part of ongoing maintenance

from azure-devops-marketplace.

jessehouwing avatar jessehouwing commented on July 1, 2024

The workflow relies on a Personal Access Token for any Azure DevOps organization with the scope:
marketplace:read from the top of my head.

renovatebot/renovate#19694 (comment)

Since setting this up it would now also be possible to rewrite the auth logic to rely on an Azure Service principal using Azure Workload Federation and OIDC, but that requires a bit more work to make that work.

https://jessehouwing.net/publish-azure-devops-extensions-using-workload-identity-oidc/

from azure-devops-marketplace.

jessehouwing avatar jessehouwing commented on July 1, 2024

Added docs to the repo with the combined scopes required to run the scripts:

https://github.com/renovatebot/azure-devops-marketplace/blob/main/docs/azure-devops-access.md

With it I moved the AZURE_DEVOPS_ORG from a secret to a variable. The needed scopes are indeed marketplace:read and agent pool: read to whatever organization is configured to read the data from.

I've also limited the permissions requested by the workflow to contents:write while I was af it, no need for any more permissions.

from azure-devops-marketplace.

rarkins avatar rarkins commented on July 1, 2024

@jessehouwing thanks. What's the difference between secret and variable here? I would have thought a token should be a secret.

Can you also clarify the meaning of the following?

The token must be generated for the Azure DevOps organization which agent pool will be queried.

I read that and think "is that me?" I assume the token still needs updating.

from azure-devops-marketplace.

jessehouwing avatar jessehouwing commented on July 1, 2024

@jessehouwing thanks. What's the difference between secret and variable here? I would have thought a token should be a secret.

Can you also clarify the meaning of the following?

There are 2 settings:

  • AZURE_DEVOPS_ORG - The name of the organization that we connect to, to read the official microsoft tasks. I believe this is currently configured to @JamieMagee's devops instance. This isn't a secret.
  • AZURE_DEVOPS_PAT - This is the secret key we use to read the marketplace and the data in the devops instance. This needs to be protected. And again I think @JamieMagee's token was configured in the past.

The token must be generated for the Azure DevOps organization which agent pool will be queried.

I read that and think "is that me?" I assume the token still needs updating.

This still needs doing. And they need to be stored in the Actions secrets and variables for this repo.

from azure-devops-marketplace.

rarkins avatar rarkins commented on July 1, 2024

I've created https://dev.azure.com/renovatebot-download/ but I'm not sure what I need to do about "agent pools". I see this:

**
image
**

from azure-devops-marketplace.

rarkins avatar rarkins commented on July 1, 2024

Added this PAT:

image

Unfortunately this error:

image

https://github.com/renovatebot/azure-devops-marketplace/actions/runs/8996125170/job/24726322791

from azure-devops-marketplace.

jessehouwing avatar jessehouwing commented on July 1, 2024

@rarkins looks like you did the right thing, the files are updated again. The API from the marketplace has been a bit flakey lately. I may actually add some retry-logic to the script when I have the time.

from azure-devops-marketplace.

rarkins avatar rarkins commented on July 1, 2024

Thanks, you're right: subsequent ones have all succeeded: https://github.com/renovatebot/azure-devops-marketplace/actions/workflows/create-renovate-data.yml

from azure-devops-marketplace.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.