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

Implement support for remote_user_secret option #31

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ scenario:
- prepare
- converge
- side_effect
- idempotence
# - idempotence # disabling idempotence because the remote_user_secret option is not idempotent
- verify
- cleanup
- destroy
5 changes: 5 additions & 0 deletions tasks/set_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
ansible.builtin.set_fact:
_galaxy_bootstrap_api_key: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_lowercase', 'digits'], length=50) }}"

- name: Generate a remote user secret
when: not _molecule_idempotence
ansible.builtin.set_fact:
_galaxy_remote_user_secret: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_lowercase', 'digits'], length=50) }}"

- name: Load nginx variables
ansible.builtin.include_vars: vars/nginx_vars.yml

Expand Down
1 change: 1 addition & 0 deletions vars/galaxy_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ galaxy_configuration:
allow_user_deletion: true
admin_users: "{{ _galaxy_admins }}"
remote_user_maildomain: "{{ _galaxy_remote_user_maildomain }}"
remote_user_secret: "{{ _galaxy_remote_user_secret }}"
database_connection: "postgresql:///galaxy?host=/var/run/postgresql"
file_path: "{{ galaxy_mutable_data_dir }}/datasets"
job_config_file: "{{ galaxy_config_dir }}/job_conf.yml"
Expand Down
2 changes: 2 additions & 0 deletions vars/nginx_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ galaxy_nginx_vhost_config:
location: /
proxy_pass: "http://{{ _galaxy_local_address }}"
auth: "{{ _molecule_active | ternary(omit, 'sram') }}"
proxy_headers:
REMOTE_USER_SECRET: "{{ _galaxy_remote_user_secret | default(omit) }}"
- name: api
location: /api/
proxy_pass: "http://{{ _galaxy_local_address }}/api/"
Expand Down
Loading