[GH-ISSUE #20] Basic Auth Error #14

Open
opened 2026-02-27 07:15:10 +03:00 by kerem · 3 comments
Owner

Originally created by @Nassiel on GitHub (Apr 19, 2020).
Original GitHub issue: https://github.com/jc21/docker-registry-ui/issues/20

With the latest versión, when you use a registry that uses basic authentication, I receive the next error:
[4/19/2020] [8:03:15 PM] [Express ] › ⚠ warning Error: getaddrinfo ENOTFOUND USER User:443

For <registry_user> you see the real user name. After doing some research, right now the basic auth is doing by concatenating the user:pass inside the calling URL. Despite this could work, the restler parser is failing and takes the user as FQDN for the DNS.

My recommendation is to change how the options of restler are being generated and use the username and password parameters. Something like:

this.getUrlOptions = function (version) {
    let options = {
        headers: {
            'User-Agent': 'Docker Registry UI'
        },
        username = username,
        password = password
    };

    if (version === 2) {
        options.headers.Accept = 'application/vnd.docker.distribution.manifest.v2+json';
    }

    return options;
};

I tried to debug the solution but it fails with the table-ui so I cannot send you a pull request. Thanks!

Originally created by @Nassiel on GitHub (Apr 19, 2020). Original GitHub issue: https://github.com/jc21/docker-registry-ui/issues/20 With the latest versión, when you use a registry that uses basic authentication, I receive the next error: `[4/19/2020] [8:03:15 PM] [Express ] › ⚠ warning Error: getaddrinfo ENOTFOUND USER User:443` For <registry_user> you see the real user name. After doing some research, right now the basic auth is doing by concatenating the user:pass inside the calling URL. Despite this could work, the restler parser is failing and takes the user as FQDN for the DNS. My recommendation is to change how the options of restler are being generated and use the username and password parameters. Something like: ``` this.getUrlOptions = function (version) { let options = { headers: { 'User-Agent': 'Docker Registry UI' }, username = username, password = password }; if (version === 2) { options.headers.Accept = 'application/vnd.docker.distribution.manifest.v2+json'; } return options; }; ``` I tried to debug the solution but it fails with the table-ui so I cannot send you a pull request. Thanks!
Author
Owner

@fjgsanandres commented on GitHub (Oct 7, 2020):

There are no solution for this? :(

<!-- gh-comment-id:705064553 --> @fjgsanandres commented on GitHub (Oct 7, 2020): There are no solution for this? :(
Author
Owner

@Nassiel commented on GitHub (Aug 8, 2022):

Hi, @jc21 @jamesdube @huapox. Are you open to allowing more contributors to the project? Many requests, issues and PRs are open without an answer for a long time, and I think it's a shame because the solution is quite good, I'd say, to abandon it. What do you think?

<!-- gh-comment-id:1208058036 --> @Nassiel commented on GitHub (Aug 8, 2022): Hi, @jc21 @jamesdube @huapox. Are you open to allowing more contributors to the project? Many requests, issues and PRs are open without an answer for a long time, and I think it's a shame because the solution is quite good, I'd say, to abandon it. What do you think?
Author
Owner

@Nassiel commented on GitHub (Jun 4, 2023):

@jc21 @jamesdube @huapox @xvmaatmat any option to be added as a contributor to keep this alive or can I close this PR forever?

<!-- gh-comment-id:1575581705 --> @Nassiel commented on GitHub (Jun 4, 2023): @jc21 @jamesdube @huapox @xvmaatmat any option to be added as a contributor to keep this alive or can I close this PR forever?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-registry-ui-jc21#14
No description provided.