Login to registry does not work for AWS ECR
Is your enhancement related to a problem? Please describe
Not able to login to private registry:
Note that
I am able to login AWS ECR repositories with podman login --username AWS --password-stdin
What I expected was that adding
Server URL:
Describe the solution you'd like
I would like podman desktop to be able to login same repository than terminal podman is able to login
Describe alternatives you've considered
No response
Additional context
tried it with Version v0.8.0 using Fedora 36. Podman desktop says Podman is running version 4.2.1
Hello,
is it possible to say what is returned when you do
curl -v -SsL https://<your-registry-url>dkr.ecr..amazonaws.com/v2/
for example:
curl -v -SsL https://ghcr.io/v2/
we have some tests there https://github.com/benoitf/desktop/blob/429ba71d7f16c30f570d14d8e77f60d2e1211fa4/packages/main/src/plugin/image-registry.spec.ts
so wondering what is returned
@oappicgi if you can provide what is returned when we go the v2/ endpoint on the registry API ? thanks
Sorry for late reply:
here is the output. I left region in, but again removed accountid
curl -v -SsL https://<aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com
* Trying 63.32.243.33:443...
* Connected to <aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com (63.32.243.33) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*.dkr.ecr.eu-west-1.amazonaws.com
* start date: Sep 23 00:00:00 2022 GMT
* expire date: Sep 14 23:59:59 2023 GMT
* subjectAltName: host "<aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com" matched cert's "*.dkr.ecr.eu-west-1.amazonaws.com"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
* SSL certificate verify ok.
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET / HTTP/1.1
> Host: <aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com
> User-Agent: curl/7.82.0
> Accept: */*
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
< Docker-Distribution-Api-Version: registry/2.0
< Sizes:
< Www-Authenticate: Basic realm="https://<aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com/",service="ecr.amazonaws.com"
< Date: Tue, 18 Oct 2022 06:35:05 GMT
< Content-Length: 15
< Content-Type: text/plain; charset=utf-8
<
Not Authorized
* Connection #0 to host <aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com left intact
thanks @oappicgi
@oappicgi it will be fixed by https://github.com/containers/podman-desktop/pull/647
my apologizes again, accidentally copy pasted wrong output. Earlier one was with out /v2/
curl -v -SsL https://<aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com/v2/
* Trying 63.32.243.33:443...
* Connected to <aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com (63.32.243.33) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*.dkr.ecr.eu-west-1.amazonaws.com
* start date: Sep 23 00:00:00 2022 GMT
* expire date: Sep 14 23:59:59 2023 GMT
* subjectAltName: host "<aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com" matched cert's "*.dkr.ecr.eu-west-1.amazonaws.com"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
* SSL certificate verify ok.
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET /v2/ HTTP/1.1
> Host: <aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com
> User-Agent: curl/7.82.0
> Accept: */*
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
< Docker-Distribution-Api-Version: registry/2.0
< Sizes:
< Www-Authenticate: Basic realm="https://<aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com/",service="ecr.amazonaws.com"
< Date: Tue, 18 Oct 2022 12:40:41 GMT
< Content-Length: 15
< Content-Type: text/plain; charset=utf-8
<
Not Authorized
* Connection #0 to host <aws_accountid>.dkr.ecr.eu-west-1.amazonaws.com left intact
@benoitf Thanks! Really appreciate your work.
I've setup a ECR registry to test. Basically we didn't implemented the Basic auth as it seems all registries switched to a token based/bearer algorithm but ECR is using Basic realm.
@oappicgi if you can try https://github.com/containers/podman-desktop/actions/runs/3273442816#artifacts