Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.
This repository was archived by the owner on May 14, 2025. It is now read-only.

Unable to configure Harbor as container registry #5548

@cgpoh

Description

@cgpoh

Description:
I'm trying to configure SCDF to use our private Harbor registry in Kubernetes. I've created the .dockerconfigjson as image pull secret (harbor-registry) in the cluster and using the bitnami Helm chart, I added the following configuration:

containerRegistries:
  harbor-registry:
    authorization-type: dockeroauth2
    registry-host: registry.test
    user: myUser
    secret: mySecret
    extra:
      registryAuthUri: https://registry.test/service/token?service=harbor-registry&scope=repository:{repository}:pull

  extraVolumes:
    - name: harbor-registry
      secret:
        secretName: harbor-registry
  extraVolumeMounts:
    - name: harbor-registry
      readOnly: true
      mountPath: /etc/secrets/harbor-registry

deployer:
  imagePullSecrets:
    - harbor-registry

Release versions:

{
  "versions": {
    "implementation": {
      "name": "spring-cloud-dataflow-server",
      "version": "2.11.1"
    },
    "core": {
      "name": "Spring Cloud Data Flow Core",
      "version": "2.11.1"
    },
    "dashboard": {
      "name": "Spring Cloud Dataflow UI",
      "version": "3.4.1"
    },
    "shell": {
      "name": "Spring Cloud Data Flow Shell",
      "version": "2.11.1",
      "url": "https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.11.1/spring-cloud-dataflow-shell-2.11.1.jar"
    }
  },
  "features": {
    "streams": true,
    "tasks": true,
    "schedules": true,
    "monitoringDashboardType": "NONE"
  },
  "runtimeEnvironment": {
    "appDeployer": {
      "deployerImplementationVersion": "2.11.1",
      "deployerName": "Spring Cloud Skipper Server",
      "deployerSpiVersion": "2.11.1",
      "javaVersion": "17.0.8",
      "platformApiVersion": "",
      "platformClientVersion": "",
      "platformHostVersion": "",
      "platformSpecificInfo": {
        "default": "kubernetes"
      },
      "platformType": "Skipper Managed",
      "springBootVersion": "2.7.16",
      "springVersion": "5.3.30"
    },
    "taskLaunchers": [
      {
        "deployerImplementationVersion": "unknown",
        "deployerName": "KubernetesTaskLauncher",
        "deployerSpiVersion": "unknown",
        "javaVersion": "17.0.8",
        "platformApiVersion": "v1",
        "platformClientVersion": "unknown",
        "platformHostVersion": "unknown",
        "platformSpecificInfo": {
          "namespace": "rep-test",
          "master-url": "https://172.16.0.1:443/"
        },
        "platformType": "Kubernetes",
        "springBootVersion": "2.7.16",
        "springVersion": "5.3.30"
      }
    ]
  },
  "monitoringDashboardInfo": {
    "url": "",
    "source": "default-scdf-source",
    "refreshInterval": 15
  },
  "security": {
    "isAuthentication": false,
    "isAuthenticated": false,
    "username": null,
    "roles": []
  }
}

Steps to reproduce:
I register my Springboot 3 app using the dashboard and have this in the docker uri: docker://registry.test/harbor-project-name/components/myapp:1.0.0

When clicking on my app in the dashboard to see more details, I get the following error in the SCDF server log:

2023-11-09 06:03:53.487  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies :_gorilla_csrf=MTY5OTUwOTgzM3xJa1kxTkZOeGFYZFpUVEEyZWxKclREUmFaalV5TXpWdVVWQnZaVzUzYVZZd05FNWxUa3B6VHpaTFIzTTlJZ289fJvBHXcFP3nsU5y0uhqxrAnAqbY9DtKbhy3XmnZKp583; Path=/; Expires=Thu, 09 Nov 2023 18:03:53 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:53 GMT
2023-11-09 06:03:53.735  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzM3xJbFIxV0RacE0xbzNkRVZYYWxKUFVtdzBiSFEwVlhWUVpVbE5Wa3d6VlcwMEsyOUdSR2cyZGxacFVGazlJZ289fHFyREhSNlEqYbNM59SQz73dtJo96NGBEUACvISlumwC; Path=/; Expires=Thu, 09 Nov 2023 18:03:53 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:53 GMT
2023-11-09 06:03:54.507  WARN 1 --- [nio-8080-exec-8] ApplicationConfigurationMetadataResolver : Failed to retrieve properties for resource Docker Resource [docker:registry.test/harbor-project-name/components/myapp:1.0.0] because of HttpClientErrorException.BadRequest: 400 Authentication information is not given in the correct format. Check the value of Authorization header.: "?<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication information is not given in the correct format. Check the value of Authorization header.<EOL>RequestId:c0d84b19-f01e-008d-35d2-1257c4000000<EOL>Time:2023-11-09T06:03:54.4301786Z</Message></Error>"
2023-11-09 06:03:55.191  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzNHxJbTFNUlhkYU1HOXpXV1JEZEZSVGRuSk5ZMEV2Y0dKNGIycFhRV2hYTkdObFF6RnFUVFJGVDFaM1FXODlJZ289fKNhTX3nhvvIE7w6ViGSCtQomqssQMB2MoaoyWaVbCYQ; Path=/; Expires=Thu, 09 Nov 2023 18:03:54 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:54 GMT
2023-11-09 06:03:55.476  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzNXxJa0UxU1hSTVlrdzNkemwzUWs1cmVFeHhOMHAzTTAwNVZtRTJjMUJuWmxsUk9GbE5LM1JQYWtSWFYxRTlJZ289fFpCvie-lIYL2pBjfJOQ0i8qcryyHf2E0Pj5FtLHKMKg; Path=/; Expires=Thu, 09 Nov 2023 18:03:55 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:55 GMT
2023-11-09 06:03:55.725  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzNXxJblZ4V2xwa1dVaDROemR4TVdrNGJWRTBjM2xVUm5kbVV6SjVLMVpYWmswd1dGWmpZVzVsUW10UFVYTTlJZ289fM7tb8ifi6vEka8jRg9A4yJGE5hueqJrgS6sbIoLg3EB; Path=/; Expires=Thu, 09 Nov 2023 18:03:55 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:55 GMT
2023-11-09 06:03:55.874  WARN 1 --- [nio-8080-exec-8] ApplicationConfigurationMetadataResolver : Failed to retrieve port names for resource Docker Resource [docker:registry.test/harbor-project-name/components/myapp:1.0.0] because of HttpClientErrorException.BadRequest: 400 Authentication information is not given in the correct format. Check the value of Authorization header.: "?<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication information is not given in the correct format. Check the value of Authorization header.<EOL>RequestId:c0d84c7e-f01e-008d-71d2-1257c4000000<EOL>Time:2023-11-09T06:03:55.8013832Z</Message></Error>"
2023-11-09 06:03:56.353  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzNXxJa2QxUzA5dEsxcFVNa2RHVTAwNE5WWnNXbnBaZUZCNGJHdG9aVXBIWkVOWGVXaGxZa2xLYTFsRVFWazlJZ289fNKey1Jy5AgH7jCMx41l7fgaJ6e_XoIdf-80Fwm-K5vm; Path=/; Expires=Thu, 09 Nov 2023 18:03:55 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:55 GMT
2023-11-09 06:03:56.652  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzNnxJbW81Vm1SM1FrTlpSakJVYWpCRFRGQm5PRzFOVjNJMVYwcFlZV3hZTjBGNlIwNVlNalpRTlVGVFZ6ZzlJZ289fCcg6kCYfVwPNBDK86-lFyaUoqQ1fjv0o9NGmfJR5ddq; Path=/; Expires=Thu, 09 Nov 2023 18:03:56 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:56 GMT
2023-11-09 06:03:56.901  WARN 1 --- [nio-8080-exec-8] o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: _gorilla_csrf=MTY5OTUwOTgzNnxJbXc1YTFaeWNWVmhTMWRqT1hvMlkwWTNibmt2YTNKWGJrOUlTMmRRTWxSb1dIbEtSbTlSWkZaWVlqQTlJZ289fJK2AiAjPSmp43I6wGdT0lK4lJm_oSz1xHKObER4eDij; Path=/; Expires=Thu, 09 Nov 2023 18:03:56 GMT; Max-Age=43200; HttpOnly; Secure; SameSite=Strict". Invalid 'expires' attribute: Thu, 09 Nov 2023 18:03:56 GMT
2023-11-09 06:03:57.050  WARN 1 --- [nio-8080-exec-8] ApplicationConfigurationMetadataResolver : Failed to retrieve port names for resource Docker Resource [docker:registry.test/harbor-project-name/components/myapp:1.0.0] because of HttpClientErrorException.BadRequest: 400 Authentication information is not given in the correct format. Check the value of Authorization header.: "?<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication information is not given in the correct format. Check the value of Authorization header.<EOL>RequestId:c0d84d98-f01e-008d-7dd2-1257c4000000<EOL>Time:2023-11-09T06:03:56.9777002Z</Message></Error>"

How can I resolve this issue?

Metadata

Metadata

Assignees

Labels

status/need-triageTeam needs to triage and take a first look

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions