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

[ansible/artifactory] Allow to configure custom trusted certificates #368

Open
jcoste-orange opened this issue Jan 24, 2024 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@jcoste-orange
Copy link

jcoste-orange commented Jan 24, 2024

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST

Which installer:
Ansible

Which product and version (eg: ansible & collection version - 7.24.2):
Artifactory 7.71.10

Which operating system and version(eg: ubuntu & version - 20.4):
Ubuntu 20.04

Which product license (Enterprise/Pro):
Enterprise

JFrog support reference (if already raised with support team):

What happened:
I need to configure a trusted certificate to access an internal S3 server for my binary store.
I can't configure it before playing the artifactory role (as folders are not yet created).
If I run the role, Artifactory tries to start and fails as it can't access to the S3 server.

What you expected to happen:
It would be nice to be able to configure custom trustes certificates in the artifactory role.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

@chukka chukka added the enhancement New feature or request label Jan 24, 2024
@chukka
Copy link
Collaborator

chukka commented Jan 24, 2024

@jcoste-orange Thanks for reaching out ! can you share more information with an example

@jcoste-orange
Copy link
Author

Our S3 server is using a self signed certificate.
So we have to store the certificate in /opt/jfrog/artifactory/var/etc/security/keys/trusted/.

Today we have to patch the role to add a task like this :

    - name: copy custom cert
      become: true
      ansible.builtin.copy:
        src: "<local_custom_cert.crt>"
        dest: "/opt/jfrog/artifactory/var/etc/security/keys/trusted/custom.crt"
        owner: "{{ artifactory_user }}"
        group: "{{ artifactory_group }}"
        mode: 0600
        remote_src: true

@bbaassssiiee
Copy link
Contributor

bbaassssiiee commented Jan 24, 2024

The variables to do this are documentented in this README.md

If you install your own certs, then you can set any path to the key and cert, and set the boolean ssl_certificate_install: false. I prefer to use a subdir under /etc/pki/tls, and not in the product directory.

@jcoste-orange
Copy link
Author

No, ssl_certificate_install is to install the certificate that will be used (exposed) by NGinx.
What we need is [this] (https://jfrog.com/help/r/artifactory-how-to-debug-ssl-issues-with-artifactory/what-is-the-process-for-importing-ssl-certificates-into-the-jvm-keystore).
So I need to be able to put some certificates in /opt/jfrog/artifactory/var/etc/security/keys/trusted/

@bbaassssiiee
Copy link
Contributor

Ok, clear. You could deploy with this variable, and start it after you placed the cert there:

artifactory_start_service: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants