passing static values that are not in AD???

78 views
Skip to first unread message

Keith Alston (Staff)

unread,
May 13, 2021, 11:25:57 AM5/13/21
to cas-...@apereo.org
I'm running cas 5.3.14 and have a SAML2 sp who requires attributes that are not in AD. schoolName/schoolNumber.
How can I send these without adding attribs to my directory?

Keith Alston
Regent University
IT Department

Jon Anderson

unread,
May 13, 2021, 11:38:32 AM5/13/21
to cas-...@apereo.org
I believe with a combination of these:

This is tweaked from one of mine:

    "attributeReleasePolicy" : {
        "@class" : "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
        "allowedAttributes" : {
            "@class" : "java.util.TreeMap",
            "a_read_attr_name" : "desired_attr_name",
            "another_desired_attr_name" : "groovy { return 'a_string_value' }"
        }
    }

Jon

From: cas-...@apereo.org [cas-...@apereo.org] on behalf of Keith Alston (Staff) [kei...@regent.edu]
Sent: Thursday, May 13, 2021 10:25 AM
To: cas-...@apereo.org
Subject: [cas-user] passing static values that are not in AD???

CAUTION: THIS EMAIL ORIGINATED FROM OUTSIDE OF ORU

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/BL0PR10MB2995E62DDA0FF5C7EB13D380D9519%40BL0PR10MB2995.namprd10.prod.outlook.com.

Dustin J Luck

unread,
May 13, 2021, 11:39:25 AM5/13/21
to CAS Community, Keith Alston (Staff)
I've been using inline groovy in the service definition attribute release.

      "schoolName" : "groovy { return 'Regent University' }"

I'm interested to see if anyone else knows of a better way.

Jeremiah Garmatter

unread,
May 13, 2021, 4:12:41 PM5/13/21
to CAS Community, Dustin J Luck, Keith Alston (Staff)
Keith,

I believe we have the same SP, I used the "Stub" attribute repository to release a set of static attributes.

Relevant section in my cas.properties looks something like this (Note: I use CAS 6.2):
#-----Stub (Static attributes)----------------------------------------------------------------------------------------------------#
#-----These are hardcoded attributes for B&N----------------------------------------------------------------------------------------------#
cas.authn.attribute-repository.stub.attributes.schoolName=<Name to be returned>
cas.authn.attribute-repository.stub.attributes.schoolNumber=<Number to be returned>
Reply all
Reply to author
Forward
0 new messages