Under Construction

As installed the SHIBD_IDP system service runs as the “Local System Account”. For obvious reasons, it is preferable to run the service with as few permissions and privileges as possible. In particular it is important to deny the service the option of writing to the IdP’s own configuration.

This is done after (every) installation and is quite easy to achieve. There are three steps:

Create an Appropriate Account

note

Throughout we will use the id SHIBD_USER to refer to the created user. Obviously this can be any identifier you want.

Throughout we will use the id SHIBD_USER to refer to the created user. Obviously this can be any identifier you want.

note

Users of Active Directory should consider service accounts and in particular “group Managed Service Accounts

Users of Active Directory should consider service accounts and in particular “group Managed Service Accounts

The created account should have as few privileges and permissions as possible. In particular:

Needs reviewed by someone with AD / Windows System Admin expertise

Add Appropriate ACEs to various System Objects

How to do this manually

  1. Open Regedit. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\shibd_idp

  2. Open Explorer,  Right Click on C:\Program Files (x86)\Shibboleth\IdP\jetty-base\start.d

  3. Repeat the above for C:\Program Files (x86)\Shibboleth\IdP\conf

  4. Repeat the above for C:\Program Files (x86)\Shibboleth\IdP\credentials

  5. Open Explorer,  Right click on C:\Program Files (x86)\Shibboleth\IdP\jetty-base\logs

  6. Repeat for C:\Program Files (x86)\Shibboleth\IdP\IdP\jetty-base\tmp

  7. Repeat for C:\Program Files (x86)\Shibboleth\IdP\logs

  8. Repeat for C:\Program Files (x86)\Shibboleth\ProcRun\log

In Summary

Object Type

Name

ACE to add

RegistryKey

HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\shibd_idp

READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\IdP\jetty-base\start.d

READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\IdP\IdP\conf

READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\IdP\IdP\credentials

READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\IdP\IdP\jetty-base\logs

READ/WRITE/DELETE/CONTROL for READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\IdP\IdP\logs

READ/WRITE/DELETE/CONTROL for READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\ProcRun\log

READ/WRITE/DELETE/CONTROL for READ for SHIBD_USER

Directory

C:\Program Files (x86)\Shibboleth\IdP\IdP\jetty-base\tmp

READ/WRITE/DELETE/CONTROL for READ for SHIBD_USER

Arrange for the service to run as SHIBD_USED

Testing and Debugging

The service should restart without problems. You should check (with task manager) that the it is running under the correct account.

As usual failure to start should be debugged by checking the logs:

  1. If idp-process.log is being written to, then the change has been successful

  2. Otherwise , if the jetty logs (IdP\jetty-base\logs) are being written then the issue is with Jetty and those logs will help

  3. Otherwise, if the procrun logs (Procrun\log) are being written, then they will help

  4. Otherwise, consult the Windows Even log.

If you are using any new or non standard locations (for instance to cache metadata), then you may need to add ACE’s to allow Jetty and the IdP access.

Updating (IdP versions 4.2 and earlier)

You have to redo the setting of the ACLs and the setting of the service account after every update.