Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Cert Authentication for External Postgres #1859

Open
mmurtha opened this issue Nov 15, 2024 · 2 comments
Open

Client Cert Authentication for External Postgres #1859

mmurtha opened this issue Nov 15, 2024 · 2 comments

Comments

@mmurtha
Copy link

mmurtha commented Nov 15, 2024

Please add support for configuring client certificate authentication when connecting to an external PostgreSQL database. This would involve specifying paths for the following files in the Helm chart values (Values.database.external) and the corresponding configuration in the chart:

sslcert (Client certificate)
sslkey (Client key)
sslrootcert (CA certificate)

I have found one user-submitted PR for this functionality but it does not appear to have been implemented:
damyan#1

Thank you

@mmurtha mmurtha changed the title Client Cert Authentication for External Postgres Client Cert Authentication for External Postgres label:kind/requirement Nov 15, 2024
@mmurtha mmurtha changed the title Client Cert Authentication for External Postgres label:kind/requirement Client Cert Authentication for External Postgres Nov 15, 2024
@Med-hedi-bra
Copy link

I think this is a very valuable contribution.

I have installed Harbor using Helm and am trying to connect the Harbor core to an external database with SSL communication enabled using the following configuration:

database:
  type: external
  external:
    sslmode: verify-full

However, I encountered the following error:

failed to initialize database: Register db Ping `default`, failed to connect to `host=223.144.17.83 user=harbor database=harbor`: failed to write startup message (tls: failed to verify certificate: x509: certificate is valid for 51.15.200.157, 51.50.24.161, 51.151.24.161, not 195.154.197.18

This behavior is expected because the certificate is not mounted inside the filesystem of the Harbor components.

I believe this is a critical issue, as SSL communication is essential. We should provide a way to mount the certificate within the Harbor components to enable proper SSL communication with external databases.

@mmurtha
Copy link
Author

mmurtha commented Dec 10, 2024

I think this is a very valuable contribution.

I have installed Harbor using Helm and am trying to connect the Harbor core to an external database with SSL communication enabled using the following configuration:

database:
  type: external
  external:
    sslmode: verify-full

However, I encountered the following error:

failed to initialize database: Register db Ping `default`, failed to connect to `host=223.144.17.83 user=harbor database=harbor`: failed to write startup message (tls: failed to verify certificate: x509: certificate is valid for 51.15.200.157, 51.50.24.161, 51.151.24.161, not 195.154.197.18

This behavior is expected because the certificate is not mounted inside the filesystem of the Harbor components.

I believe this is a critical issue, as SSL communication is essential. We should provide a way to mount the certificate within the Harbor components to enable proper SSL communication with external databases.

I have SSL verification working on the connection to the database. The issue I have is I have to use username/password rather than client cert authentication.

Your error may be due to your certificate. Perhaps an SNI error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants