| 280 | === Using CA SiteMinder Authentication |
| 281 | Setup CA SiteMinder to protect your Trac login URL (e.g. /trac/login). Then modify the trac.wsgi script generated using `trac-admin <env> deploy <dir>` to add the following lines, which extract the HTTP_SM_USER variable and set it to REMOTE_USER: |
| 282 | |
| 283 | {{{#!python |
| 284 | def application(environ, start_request): |
| 285 | # Set authenticated username on CA SiteMinder to REMOTE_USER variable |
| 286 | # strip() is used to remove any spaces on the end of the string |
| 287 | if 'HTTP_SM_USER' in environ: |
| 288 | environ['REMOTE_USER'] = environ['HTTP_SM_USER'].strip() |
| 289 | ... |
| 290 | }}} |
| 291 | |
| 292 | Note: you do not need any Apache "Location" directives. |
| 293 | |