Changes between Version 1 and Version 2 of spiam2018
- Timestamp:
- Sep 4, 2018, 5:15:08 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
spiam2018
v1 v2 64 64 65 65 5. These configurations are based for test purposes with self generated ssl certificates. 66 If you have purchased ssl certificate from a commercial CA substitute those with the self signed files. 67 If you wish to get '''letsencrypt''' certificates //Skip //to '''Step 10'''. 68 69 Create a Certificate and a Key self-signed for HTTPS: 70 * ```openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/ssl-sp.key -out /etc/ssl/certs/ssl-sp.crt -nodes -days 1095``` 66 If you have purchased ssl certificate from a commercial CA substitute those with the self signed files. If you wish to get '''letsencrypt''' certificates //Skip //to '''Step 10'''. 67 68 Create a Certificate and a Key self-signed for HTTPS: 69 * 70 {{{ 71 openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/ssl-sp.key -out /etc/ssl/certs ssl-sp.crt -nodes -days 1095 72 }}} 71 73 72 74 6. Modify the file ```/etc/apache2/sites-available/sp-ssl.conf``` as follows: 73 75 74 ```apache 76 {{{ 75 77 <IfModule mod_ssl.c> 76 78 SSLStaplingCache shmcb:/var/run/ocsp(128000) … … 104 106 </VirtualHost> 105 107 </IfModule> 106 ``` 107 108 7. Enable **proxy_http**, **SSL** and **headers** Apache2 modules: 109 * ```a2enmod proxy_http ssl headers alias include negotiation``` 110 * ```a2ensite sp-ssl.conf``` 111 * ```systemctl restart apache2``` 112 113 8. Configure Apache2 to open port **80** only for localhost: 114 * ```vim /etc/apache2/ports.conf``` 115 116 ```apache 108 }}} 109 110 7. Enable '''proxy_http''', '''SSL''' and '''headers''' Apache2 modules: 111 * 112 {{{ 113 a2enmod proxy_http ssl headers alias include negotiation 114 }}} 115 * 116 {{{ 117 a2ensite sp-ssl.conf 118 }}} 119 * 120 {{{ 121 systemctl restart apache2 122 }}} 123 124 8. Configure Apache2 to open port '''80''' only for localhost: 125 * 126 {{{ 127 vim /etc/apache2/ports.conf 128 }}} 129 {{{ 117 130 # If you just change the port or add more ports here, you will likely also 118 131 # have to change the VirtualHost statement in … … 128 141 Listen 443 129 142 </IfModule> 130 ``` 143 }}} 131 144 9. Configure Apache2 to redirect all on HTTPS: 132 * ```vim /etc/apache2/sites-enabled/000-default.conf``` 133 134 ```apache 145 * 146 {{{ 147 vim /etc/apache2/sites-enabled/000-default.conf 148 }}} 149 {{{ 135 150 <VirtualHost *:80> 136 151 ServerName "sp.YOUR-DOMAIN" … … 138 153 RedirectMatch permanent ^/(.*)$ https://sp.YOUR-DOMAIN/$1 139 154 </VirtualHost> 140 ``` 141 10. **Let'sencrypt** setup (*Skip this step if you already configured SSL with self signed or CA provided certificates*) 142 143 Disable the default configuration 144 * `cd /etc/apache2/sites-available/` 145 * `a2dissite 000-default.conf` 146 * `systemctl reload apache2` 147 148 Create a new conf file as `sp.conf` 149 150 * `cp 000-default.conf sp.conf` 151 152 Edit `sp.conf` with following 153 154 * `vim sp.conf` 155 156 ```apache 155 }}} 156 10. '''Let'sencrypt''' setup (//Skip this step if you already configured SSL with self signed or CA provided certificates//) 157 158 Disable the default configuration 159 * 160 {{{ 161 cd /etc/apache2/sites-available/ 162 }}} 163 * 164 {{{ 165 a2dissite 000-default.conf 166 }}} 167 * 168 {{{ 169 systemctl reload apache2 170 }}} 171 Create a new conf file as `sp.conf` 172 * 173 {{{ 174 cp 000-default.conf sp.conf 175 }}} 176 Edit `sp.conf` with following 177 * 178 {{{ 179 vim sp.conf 180 }}} 181 {{{ 157 182 <VirtualHost *:80> 158 183 … … 165 190 166 191 </VirtualHost> 167 ``` 168 169 Enable sp site by, 170 171 * `a2ensite sp` 172 173 and restart Apache 174 175 * `systemctl reload apache2` 176 177 178 Install Letsencypt and enable https 179 180 ```bash 192 }}} 193 Enable sp site by, 194 * 195 {{{ 196 a2ensite sp 197 }}} 198 and restart Apache 199 * 200 {{{ 201 systemctl reload apache2` 202 }}} 203 Install Letsencypt and enable https 204 {{{ 181 205 add-apt-repository ppa:certbot/certbot 182 206 apt install python-certbot-apache 183 207 certbot --apache -d sp.YOUR-DOMAIN 184 ``` 185 ``` 208 }}} 209 {{{ 186 210 Plugins selected: Authenticator apache, Installer apache 187 211 Enter email address (used for urgent renewal and security notices) (Enter 'c' to … … 229 253 Congratulations! You have successfully enabled https://sp.YOUR-DOMAIN 230 254 231 ``` 232 233 234 ### Configure Shibboleth SP 235 236 237 255 }}} 256 === Configure Shibboleth SP === 238 257 11. Download Federation Metadata Signing Certificate: (If its available) 239 * ```cd /etc/shibboleth/``` 240 * ```wget https://LEARN-Test-federation/signning-key.pem``` 258 * 259 {{{ 260 cd /etc/shibboleth/ 261 }}} 262 * 263 {{{ 264 wget https://LEARN-Test-federation/signning-key.pem 265 }}} 241 266 242 267