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!

    docker login failed via https reverse proxy

    Scheduled Pinned Locked Moved Support
    18 Posts 3 Posters 82 Views 1 Watching
    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.
    • V Offline
      viceice
      last edited by viceice

      Hi @rhessinger,

      Sorry my bad, it's a typo, first request is going to https://proget-test.kriese.eu/v2/ and second is going to http://proget-test.kriese.eu/v2/_auth

      The second request is expected by docker to go to http because of the wrong www-authenticate header

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

        Hi @viceice

        The http://proget-test.kriese.eu/ being returned as the Realm because it's set as the BaseUrl.

        If you remove that, then it will work; however, it would cause your instance of ProGet Free to report licensing errors due to your reverse proxy configuration.

        Ultimately this is a reverse proxy issue, and we might be able to have the Relm respect the X-Forward* headers.... however, I'm not sure if that's appropriate / okay to do?

        It might be a security problem? Can you find any documentation or discussion on this topic?

        The code change is easy, but we want to confirm it's okay to make before considering it further.

        Cheers,
        Alana

        1 Reply Last reply Reply Quote 0
        • V Offline
          viceice
          last edited by

          Hi @atripp

          My BaseUrl is empty, so proget is correctly assuming the hostname from headers.
          But as you said, it isn't respecting the X-Forward* headers.
          That why proget falsy returns a http url, because the reverse proxy is doing http to proget.

          If i add the baseUrl, i'll get licensing issues for a nuget v3 loopback connector, so i was told to empty baseUrl. see https://forums.inedo.com/topic/3037/how-to-configure-the-proget-free-with-self-connector/13

          So my assumption would be, that proget will respect the X-Forward* headers as already doing in other feeds.

          Another options would be, if we can configure proget to listen on https with a provided tls certificate, so i would have end-to-end tls encryption.

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

            Hi @viceice,

            Looking back at your other forums post. The last fix we released should allow you to set the Web.BaseUrl and with the addition of X-Forward* headers in your reverse proxy, it should not give you those license errors any more? Were you able to verify that it still does give oyu the licenses errors?

            Thanks,
            Rich

            Products Engineer, Inedo

            1 Reply Last reply Reply Quote 0
            • V Offline
              viceice
              last edited by viceice

              ok, setting BaseUrl fixes the docker login but causes new license violations

              I now have 2 feeds a and b and configured a loopback connector on a to feed b
              cdbe602b-31df-4b98-9b06-156dadc0ece2-image.png

              Errors / Warnings:
              802d1e47-0cdb-4836-a0ef-92422c4f86b6-image.png

              The visualon.test test nuget packages was added to feed b

              btw: license issues are only go away, if i configure a diffrent license key. If i simply try to update existing key, license violations aren't removed. So the docu is wrong.

              I think the solution would be that the licensing code checks passed request url against the configured baseUrl and ignore those requests.

              1 Reply Last reply Reply Quote 0
              • rhessingerR Offline
                rhessinger inedo-engineer
                last edited by

                Hi @viceice,

                Thanks for testing this for me. I think I may see your issue. When the Web.BaseUrl is set to https://proget-test.kriese.eu, the connector should use the URL https://proget-test.kriese.eu/nuget/b/v3/inedx.json. If you set it up that way, do you still get the license violations?

                I'll look into the license key issue. It should work as the documentation describes it.

                Thanks,
                Rich

                Products Engineer, Inedo

                1 Reply Last reply Reply Quote 0
                • V Offline
                  viceice
                  last edited by

                  @rhessinger said in docker login failed via https reverse proxy:

                  Thanks for testing this for me. I think I may see your issue. When the Web.BaseUrl is set to https://proget-test.kriese.eu, the connector should use the URL https://proget-test.kriese.eu/nuget/b/v3/inedx.json. If you set it up that way, do you still get the license violations?

                  yes, i can use https://proget-test.kriese.eu/nuget/b/v3/index.json or http://localhost/nuget/b/v3/index.json and always get licensing issues. (baseUrl=https://proget-test.kriese.eu)

                  So i'll set the BaseUrl on our other proget too and get starting licensing issues, even if the connector url matches the BaseUrl.

                  One thing to note is, if i set the BaseUrl to https://proget-test.kriese.eu all requests from proget connector will go through the proxy. So i think this is causing the licensing issue.

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

                    @viceice said in docker login failed via https reverse proxy:

                    So my assumption would be, that proget will respect the X-Forward* headers as already doing in other feeds.

                    You're right, when writing the Basic realm="<url>" header, ProGet does not look at the X-Forward* headers. I'm not sure if we should? Would that be a security problem? It kind of seems like it might? Or maybe not? I didn't find anything about the topic discussed on the 'net after a quick search...

                    How about just configuring your reverse proxy to just rewrite that realm in the auth header to go from http to https? I suspect, thatw ould help.

                    If you can do that, and then we can update the docs on how to do it, other Free users would be very much appreciative :)

                    1 Reply Last reply Reply Quote 0
                    • V Offline
                      viceice
                      last edited by

                      As for the security concern: maybe add an environment config option to pass trusted proxy ips like traefik supports forwardedHeaders.trustedIPs

                      Maybe another option is to use the ASP.NET Core proxy config options to solve the issue.

                      Ok, my reverse proxy isn't able to rewrite headers 😕 traefik/traefik#6047

                      So i will go with setting BaseUrl and hope that the licensing issues get fixed in a later version.
                      I only see the issues when using an admin user, which we normally not use.
                      I also hope you won't block this usage scenario in a future version whithout a proper solution. 🙃

                      1 Reply Last reply Reply Quote 0
                      • rhessingerR Offline
                        rhessinger inedo-engineer
                        last edited by

                        Hi @viceice,

                        I did a few searches and have you tried setting the hostsProxyHeaders> Maybe something like this: traefik.frontend.headers.hostsProxyHeaders=www-authenticate? The docs make it sound like it will look in those headers for URLs that are proxied. You could give that a shot.

                        Thanks,
                        Rich

                        Products Engineer, Inedo

                        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