updated sso
diff --git a/defaults/main.yml b/defaults/main.yml index 0e3b346..f4a1a08 100644 --- a/defaults/main.yml +++ b/defaults/main.yml
@@ -3,11 +3,11 @@ edge_sso_installation_config_filename: edge-sso-installer-config.conf edge_sso_installation_config_file: "{{ opdk_installer_path }}/{{ edge_sso_installation_config_filename }}" -jwt_key_folder: "{{ apigee_home }}/customer/application/apigee-sso/jwt-keys" +jwt_folder: "{{ apigee_home }}/customer/application/apigee-sso/jwt-keys" jwt_private_key: private_key.pem -sso_jwt_signinig_key_filepath: "{{ jwt_key_folder }}/{{ jwt_private_key }}" +sso_jwt_signinig_key_filepath: "{{ jwt_folder }}/{{ jwt_private_key }}" jwt_public_key: public_key.pem -sso_jwt_verification_key_filepath: "{{ jwt_key_folder }}/{{ jwt_public_key }}" +sso_jwt_verification_key_filepath: "{{ jwt_folder }}/{{ jwt_public_key }}" jwt_key_size: 2048 saml_folder: "{{ apigee_home }}/customer/application/apigee-sso/saml"
diff --git a/tasks/create-jwt-keys.yml b/tasks/create-jwt-keys.yml index 66a04fc..927c3cf 100644 --- a/tasks/create-jwt-keys.yml +++ b/tasks/create-jwt-keys.yml
@@ -7,7 +7,7 @@ - block: - name: Create folder for jwt-keys file: - path: "{{ jwt_key_folder }}" + path: "{{ jwt_folder }}" state: directory owner: "{{ opdk_user_name }}" group: "{{ opdk_group_name }}" @@ -15,35 +15,35 @@ - name: Generate a passphrase command: "openssl rand -base64 48" args: - chdir: "{{ jwt_key_folder }}" + chdir: "{{ jwt_folder }}" register: passphrase - name: Generate your private key with a passphrase shell: "openssl genrsa -passout pass:{{ passphrase.stdout }} -out {{ jwt_private_key }} {{ jwt_key_size }}" args: - chdir: "{{ jwt_key_folder }}" + chdir: "{{ jwt_folder }}" creates: "{{ jwt_private_key }}" - name: Prep to remove passphrase from Key copy: - dest: "{{ jwt_key_folder }}/remove-passphrase-{{ jwt_private_key }}" - src: "{{ jwt_key_folder }}/{{ jwt_private_key }}" + dest: "{{ jwt_folder }}/remove-passphrase-{{ jwt_private_key }}" + src: "{{ jwt_folder }}/{{ jwt_private_key }}" remote_src: yes - name: Remove the passphrase from the key shell: "openssl rsa -in remove-passphrase-{{ jwt_private_key }} -passin pass:{{ passphrase.stdout }} -out {{ jwt_private_key }}" args: - chdir: "{{ jwt_key_folder }}" + chdir: "{{ jwt_folder }}" - name: Clean up passphrase removal file file: - path: "{{ jwt_key_folder }}/remove-passphrase-{{ jwt_private_key }}" + path: "{{ jwt_folder }}/remove-passphrase-{{ jwt_private_key }}" state: absent - name: Generate Verification Key shell: "openssl rsa -pubout -in {{ jwt_private_key }} -out {{ jwt_public_key }}" args: - chdir: "{{ jwt_key_folder }}" + chdir: "{{ jwt_folder }}" become: yes when: key.stat.exists == False \ No newline at end of file
diff --git a/tasks/main.yml b/tasks/main.yml index ce85294..ff1063f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -18,6 +18,7 @@ - { key: 'edge_sso_installation_config_filename' , value: '{{ edge_sso_installation_config_filename }}' } - { key: 'edge_sso_installation_config_file', value: "{{ edge_sso_installation_config_file }}" } - { key: 'saml_folder', value: "{{ saml_folder }}" } + - { key: 'jwt_folder', value: "{{ jwt_folder }}" } - name: Create Private key and Self Signed Certificate Request tags: ['private']