Skip to content

Commit 10cb1ef

Browse files
authored
Adding Ubuntu session for SAML authentication (#1113)
* Adding Ubuntu session for SAML authentication Adding specific paths, commands and quirks when configuring SAML in Ubuntu. * fixing misspelled words
1 parent 4c0c25a commit 10cb1ef

1 file changed

Lines changed: 96 additions & 28 deletions

File tree

source/authentication/adfs-with-auth-mellon.rst

Lines changed: 96 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SAML Authentication with Active Directory Federated Services (ADFS) and mod_auth_mellon
44
========================================================================================
55

6-
The following details how to use ADFS infrastructure via SAML authentication to authenticate to an OpenOnDemand deployment.
6+
The following details how to use ADFS infrastructure via SAML authentication to authenticate to an OpenOnDemand deployment.
77

88
Prepare the Host
99
--------------------------------------------------
@@ -42,52 +42,114 @@ Install mod_auth_mellon
4242
Configure mod_auth_mellon
4343
--------------------------------------------------
4444

45-
Note that this configuration assumes that SAML has been configured such that the returned NameID directly maps to a Unix user on the OOD host. For more information, see https://jdennis.fedorapeople.org/doc/mellon-user-guide/mellon_user_guide.html
45+
Note that this configuration assumes that SAML has been configured such that the returned NameID directly maps to a Unix
46+
user on the OOD host. For more information, see https://jdennis.fedorapeople.org/doc/mellon-user-guide/mellon_user_guide.html
47+
48+
#. Change to apache's etc directory
49+
50+
.. tabs::
51+
52+
.. tab:: EL7/EL8+
53+
54+
.. code-block:: shell
55+
56+
mkdir -p /etc/httpd/mellon/
57+
cd /etc/httpd/mellon/
58+
59+
.. tab:: Ubuntu
60+
61+
.. code-block:: shell
62+
63+
mkdir -p /etc/apache2/mellon/
64+
cd /etc/apache2/mellon/
65+
4666
4767
#. Download the IDP metadata file
4868

4969
.. code-block:: shell
50-
51-
cd /etc/httpd/mellon/
52-
wget https://adfs.organization.com/ADFS/metadata.xml -O idpmetadata.xml
70+
71+
wget https://adfs.organization.com/ADFS/metadata.xml -O idpmetadata.xml
5372
5473
#. Generate the mellon metadata
5574

56-
.. code-block:: shell
75+
.. tabs::
76+
.. tab:: EL7/EL8+
77+
.. code-block:: shell
78+
79+
export mellon_endpoint="https://$(hostname)/mellon"
80+
/usr/libexec/mod_auth_mellon/mellon_create_metadata.sh "${mellon_endpoint}/metadata" "${mellon_endpoint}"
81+
mv *.cert ./mellon.cert
82+
mv *.key ./mellon.key
83+
mv *.xml ./mellon_metadata.xml
84+
85+
.. tab:: Ubuntu
86+
87+
There is a known problem on mellon_create_metadata in Ubuntu. If the xml generation fails silently try to apply the solution described at https://bugs.launchpad.net/ubuntu/+source/ssl-cert/+bug/1945774/comments/8
5788

58-
export mellon_endpoint="https://$(hostname)/mellon"
59-
/usr/libexec/mod_auth_mellon/mellon_create_metadata.sh "${mellon_endpoint}/metadata" "${mellon_endpoint}"
60-
mv *.cert ./mellon.cert
61-
mv *.key ./mellon.key
62-
mv *.xml ./mellon_metadata.xml
89+
.. code-block:: shell
90+
91+
export mellon_endpoint="https://$(hostname)/mellon"
92+
/usr/sbin/mellon_create_metadata "${mellon_endpoint}/metadata" "${mellon_endpoint}"
93+
mv *.cert ./mellon.cert
94+
mv *.key ./mellon.key
95+
mv *.xml ./mellon_metadata.xml
6396
6497
#. Create a mellon configuration file
98+
.. tabs::
99+
.. tab:: EL7/EL8+
100+
.. code-block:: shell
65101
66-
.. code-block:: shell
102+
vi /etc/httpd/conf.d/00-mellon.conf
103+
104+
.. tab:: Ubuntu
105+
.. code-block:: shell
106+
107+
vi /etc/apache2/conf-available/mellon.conf
108+
109+
#. Add the following to the apache mellon's configuration file
110+
.. tabs::
111+
112+
.. tab:: EL7/EL8+
67113

68-
vi /etc/httpd/conf.d/00-mellon.conf
114+
.. code-block:: xml
69115
70-
#. Add the following to the ``00-mellon.conf`` file
116+
<Location />
117+
MellonSPPrivateKeyFile /etc/httpd/mellon/mellon.key
118+
MellonSPCertFile /etc/httpd/mellon/mellon.cert
119+
MellonSPMetadataFile /etc/httpd/mellon/mellon_metadata.xml
120+
MellonIdPMetadataFile /etc/httpd/mellon/idpmetadata.xml
71121
72-
.. code-block:: xml
122+
MellonEndpointPath /mellon
123+
MellonEnable "auth"
124+
</Location>
73125
74-
<Location />
75-
MellonSPPrivateKeyFile /etc/httpd/mellon/mellon.key
76-
MellonSPCertFile /etc/httpd/mellon/mellon.cert
77-
MellonSPMetadataFile /etc/httpd/mellon/mellon_metadata.xml
78-
MellonIdPMetadataFile /etc/httpd/mellon/idpmetadata.xml
126+
.. tab:: Ubuntu
79127

80-
MellonEndpointPath /mellon
81-
MellonEnable "auth"
82-
</Location>
128+
.. code-block:: xml
129+
130+
<Location />
131+
MellonSPPrivateKeyFile /etc/apache2/mellon/mellon.key
132+
MellonSPCertFile /etc/apache2/mellon/mellon.cert
133+
MellonSPMetadataFile /etc/apache2/mellon/mellon_metadata.xml
134+
MellonIdPMetadataFile /etc/apache2/mellon/idpmetadata.xml
135+
136+
MellonEndpointPath /mellon
137+
MellonEnable "auth"
138+
</Location>
83139
84140
#. Convert the key and cert files into PFX format
141+
.. tabs::
142+
.. tab:: EL7/EL8+
143+
.. code-block:: shell
85144
86-
.. code-block:: shell
145+
openssl pkcs12 -export -inkey /etc/httpd/mellon/mellon.key -in /etc/httpd/mellon/mellon.cert -out /etc/httpd/mellon/mellon.pfx
87146
88-
openssl pkcs12 -export -inkey /etc/httpd/mellon/mellon.key -in /etc/httpd/mellon/mellon.cert -out /etc/httpd/mellon/mellon.pfx
147+
.. tab:: Ubuntu
148+
.. code-block:: shell
89149
90-
#. Provide the ``mellon.pfx`` and ``mellon_metadata.xml`` files to your ADFS administrator. The files can then be imported into the ADFS system.
150+
openssl pkcs12 -export -inkey /etc/apache2/mellon/mellon.key -in /etc/apache2/mellon/mellon.cert -out /etc/apache2/mellon/mellon.pfx
151+
152+
#. Provide the ``mellon.pfx`` and ``mellon_metadata.xml`` files to your ADFS administrator. The files can then be imported into the ADFS system.
91153

92154
Configure OOD
93155
--------------------------------------------------
@@ -107,7 +169,13 @@ Configure OOD
107169
- 'Require valid-user'
108170
109171
#. Restart the HTTPD
172+
.. tabs::
173+
.. tab:: EL7/EL8+
174+
.. code-block:: shell
110175
111-
.. code-block:: shell
176+
systemctl restart httpd
177+
178+
.. tab:: Ubuntu
179+
.. code-block:: shell
112180
113-
systemctl restart httpd
181+
systemctl restart apache2

0 commit comments

Comments
 (0)