Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    API key requirements on API

    Scheduled Pinned Locked Moved Support
    proget
    4 Posts 3 Posters 19 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Hi,

      We're wanting to use the api /api/promotions/promote to promote Nuget / Chocolatey packages in an environment with Windows Authentication in place.

      However we get the following response from the request: An API key is required to promote packages.

      This is frustrating - we manager the permissions with Windows Authentication - can you please remove this restriction?

      Kind Regards,

      James

      Product: ProGet
      Version: 4.8.7

      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        API Keys are required for all of our end points. This is by design, because API and interactive (user) access are quite different, and they resolve access differently.

        If you want to not use an API key, you could create one called "dummy" and always pass that in the URL; however that's not recommended, because it's like a password.

        In this case, WIA is only used to "authenticate" the request, not authorize it.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Alana,

          Creating a dummy API key creates issues with pushing packages using WIA so that is not a solution for us - "When a NuGet API key is set for a feed, that key will always be required to push packages, in addition to any other configured privileges".

          We use the in built roles/tasks/privileges in Proget for authorization, an API key is not helpful here - there is no good security reason for adding it. We have services running on Windows that support WIA and we want these to hit the API without having to use an API key.

          Can we make it a feature request please?

          Thank you

          James

          1 Reply Last reply Reply Quote 0
          • T Offline
            thoven
            last edited by

            The promotion API endpoint does not use a NuGet API key, it uses a ProGet API key. It is unfortunate that the terminology is similar, but feed endpoints are handled independently from ProGet API endpoints, so creating a ProGet API key will not interfere with normal dev use of the NuGet feed.

            You need to create an API Key in the Admin > API Keys section, and that API key will only be used for ProGet API endpoints (i.e. package promotion, package deployment, and the future "feed management" API).

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation