[MGNLCAS-15] Dynamically generate CAS service url from context path Created: 19/Aug/15  Updated: 26/Feb/16  Resolved: 26/Feb/16

Status: Closed
Project: Central Authentication Service
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: Improvement Priority: Neutral
Reporter: Charles Jones Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mgnlcas-serviceurl-nocontext.patch    
Issue Links:
relation
is related to MGNLCAS-18 Laundry list of CAS fixes Texas State... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Sprint: Kromeriz 32

 Description   

The attached patch modifies CASModule.getCasServiceURL() to append the casServiceURL property to the host+contextPath base url if it is not an absolute url.

If the casServiceURL property is an absolute url, then it is used without modification as in the current version.

If the casServiceURL property is blank or not present, the host+contextPath is returned.

This change makes it unnecessary to modify the casServiceURL property between development, staging, and production servers.



 Comments   
Comment by Charles Jones [ 25/Aug/15 ]

Better patch that handles the case when the contextPath is blank.

Comment by Milan Divilek [ 25/Feb/16 ]

Reopen: querystring, location fragment.. are not correctly removed when creating cas service url..
This can lead to invalid cas service ticket because slash is added to end of the ticket string

http://localhost:8080/magnoliaAuthor/?ticket=ST-46-qb0hLhFXJL6QzMuJopNg-cas01.example.org/
but should be
http://localhost:8080/magnoliaAuthor/?ticket=ST-46-qb0hLhFXJL6QzMuJopNg-cas01.example.org
Generated at Sun Feb 11 23:58:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.