[JIRA] (IDP-1872) Use __Host- prefix cookie names to ensure cookies come from the host

Philip Brusten (Jira) jira at shibboleth.atlassian.net
Fri Oct 22 07:23:27 UTC 2021


Philip Brusten ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=5b87bcb44d21642beb80e004 ) *created* an issue

Identity Provider ( https://shibboleth.atlassian.net/browse/IDP?atlOrigin=eyJpIjoiZTNlNzZhZTdiYjQ1NGE5ZjljOTk2YjFhODMzNDAyNTEiLCJwIjoiaiJ9 ) / Improvement ( https://shibboleth.atlassian.net/browse/IDP-1872?atlOrigin=eyJpIjoiZTNlNzZhZTdiYjQ1NGE5ZjljOTk2YjFhODMzNDAyNTEiLCJwIjoiaiJ9 ) IDP-1872 ( https://shibboleth.atlassian.net/browse/IDP-1872?atlOrigin=eyJpIjoiZTNlNzZhZTdiYjQ1NGE5ZjljOTk2YjFhODMzNDAyNTEiLCJwIjoiaiJ9 ) Use __Host- prefix cookie names to ensure cookies come from the host ( https://shibboleth.atlassian.net/browse/IDP-1872?atlOrigin=eyJpIjoiZTNlNzZhZTdiYjQ1NGE5ZjljOTk2YjFhODMzNDAyNTEiLCJwIjoiaiJ9 )

Issue Type: Improvement Affects Versions: 4.1.4 Assignee: Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 ) Components: Authentication Created: 22/Oct/21 3:23 AM Priority: Trivial Reporter: Philip Brusten ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=5b87bcb44d21642beb80e004 )

It is better to use __Host- prefixed cookies. They ensure that the cookies are set secure and on the host only (not on a domain which shares a common domain).

e.g. the SPNEGO autologin cookie is now a constant, which cannot be changed:

SPNEGOAutoLoginManager.java:
```java
@Nonnull @NotEmpty public static final String AUTOLOGIN_COOKIE_NAME = "_idp_spnego_autologin";
```

The cookie path must be "path=/". If you host multiple IdP instances on the same domain, this might be a problem. In that case it's better to make the name configurable so it can be scoped to that instance.

( https://shibboleth.atlassian.net/browse/IDP-1872#add-comment?atlOrigin=eyJpIjoiZTNlNzZhZTdiYjQ1NGE5ZjljOTk2YjFhODMzNDAyNTEiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/IDP-1872#add-comment?atlOrigin=eyJpIjoiZTNlNzZhZTdiYjQ1NGE5ZjljOTk2YjFhODMzNDAyNTEiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100183- sha1:51e3c50 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20211022/15f67380/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-1320306a-9ed1-4d46-aa9d-9160cb2baf6e
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211022/15f67380/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-96c39d99-3429-4411-9c25-33c07bf7b0f6
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211022/15f67380/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-4d2f7c38-6f62-42be-9f62-59776386e9e2
Type: image/png
Size: 563 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211022/15f67380/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-e2e82d96-84a6-4250-b581-cbe86ea43979
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20211022/15f67380/attachment-0007.png>


More information about the commits mailing list