Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Re: General Grouper question SMTP related stuff

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Re: General Grouper question SMTP related stuff


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: "Black, Carey M." <>
  • Cc: grouper-users <>
  • Subject: [grouper-users] Re: General Grouper question SMTP related stuff
  • Date: Tue, 6 Jun 2017 21:57:30 +0000
  • Accept-language: en-US
  • Authentication-results: internet2.edu; dkim=none (message not signed) header.d=none;internet2.edu; dmarc=none action=none header.from=isc.upenn.edu;
  • Ironport-phdr: 9a23:tIu1/RPvem9/MgSw4+Il6mtUPXoX/o7sNwtQ0KIMzox0I/T5rarrMEGX3/hxlliBBdydsKMbzbSO+Pi/EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6/bL9oLRi6sQrdutUUjIB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0QrNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6apgVQTlgzkbOTEn7G7Xi9RwjKNFrxKnuxx/2JPfbIWMOPZjYq/RYdYWSGxcVchTSiNBGJuxYYsRAeQcIeZWoYrzp1UMohu/GQajC/jixSVUinPqx6A2z/gtHAHA0Qc9H9wOqnPUrNDtOascU+60zKjJwivZb/9OxDzw9ojIcgogofGXU757bM3cyUwzGAPFjlSRqJLqPymO2+QMqGiU8/BsVf+3i2E5rQFxpCKjydkxhYnUn48YzE3P+yt+wIYwP9K4SUh7bMalEJtWqyGVKZF2QsU8TGF0pio20KMJtoOmfCUM1Z8pxAbfZuSZf4eS/h7vSeOcLSpliH54fb+/iRm//VS8xuD5VMS7zllHojdAn9TJqHwByxLe5tCZRvRn4kutxDOC2x3O5u1ZJE07i6XWJ4I9zrM1lpccqkDOEyvzlUrqlqCWeFsr9+2t5unkZLjtu4WSOJVuig7kN6Qjgsy/Dvo8MggJR2WV4fix2rr/8UHkWblHk+U4n6fAvJDdPssUuLS1AwhI0oY/8Bm/CCqm0NIFknUdNFJFYhWHj5T3NF7SPPD4DPC/g1K2nDds2vDGIrnhApLKLnjAirvuYbF960tExAoyy9BQ+Y5UB6kfLP3pRkP9qdnVAgIkPwCpxuvnBtpw2p8CVW+KAKKWLqzfvUKN6+8qPeWAeIEYtC74K/c/5v7uiXE5mUUafamsxZYXbWy3HvRmIkSYf3XsmMwMEWYRvgUiVuDqlUWCXiBVZ3a0Ra4z+Cw0CJ++AYfZWo+tmKCB3Du8HpBOaWBGEFeMEWrwd4qaQfcAcT+SItR/nTweTrisUIsh1RC1tA/m0LprMPDY+iwetZL/ytd1/evTmg8u9TBqFciSzXyCT3wn1l8PEnUc2Kl0ogg14V6Z3LkwproSXYhZ4/pCUUFjb8X0yPdnTd3+R1SSUM2OTQPsYsS0DCt1Bvkx2d4VKQ4pHt6inwLOxQKrGLRTiqSGAppy/67BiSuib/1hwmrLgfFyx2ItRdFCYCj/3vZy
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Glad it worked. Basically what the patch does is it tries to do the right thing. If that list of attributes has email as one of them (which is the default) and the source does not have an attribute named email, but it does have an emailattributename, then it'll substitute whatever the emailattributename is for the "email" attribute. If that makes sense.  If there is no attribute named email and there's no emailattributename then it will not show an empty row for email.

_____________________________
From: Black, Carey M. <>
Sent: Tuesday, June 6, 2017 5:02 PM
Subject: RE: General Grouper question SMTP related stuff
To: Hyzer, Chris <>


Chris,

 

First thanks for working this out.

 

I now see email addresses in the “New UI”.

                Thanks for tracking down that configuration issue.

 

So was your patch to honor “email” OR “mail” automatically?

 

--

Carey Matthew Carey Matthew

614-292-6079 Office

 

From: Hyzer, Chris []
Sent: Tuesday, June 6, 2017 3:17 PM
To: Black, Carey M. <>;
Subject: RE: General Grouper question SMTP related stuff

 

Fixed in patch or workaround (see below)

 

Ok, I figured out what the problem is.

 

There is a default source config in grouper-ui.base.properties

 

## To control the order in which subject attributes are listed in the New UI without expanding the attribute list.

subject2.attributes.order.nonexpanded.default=subjectId,email,name,description

 

You don’t have a subject attribute "email".

 

Workaround:

If you configure this in grouper-ui.properties, it will fix it (note, put the sourceId in place of <sourceId>:

 

subject2.attributes.order.nonexpanded.<sourceId>=subjectId,email,name,description

 

Fix:

If you get 2.3.0 patch UI patch 28 then it will also be fixed

 

I reproduced this by using the cmu directory source:

https://spaces.internet2.edu/display/Grouper/Grouper+Loader+LDAP+examples

 

https://bugs.internet2.edu/jira/browse/GRP-1558

 

Thanks

Chris

 

-----Original Message-----
From: Black, Carey M. []
Sent: Tuesday, June 06, 2017 9:51 AM
To: Hyzer, Chris <>;
Subject: RE: General Grouper question SMTP related stuff

 

Login to the New UI.

 

Click on the link in the upper right for your "Logged in as ...".

The header on the user that is displayed includes a "email:" that is blank for all Subjects.

Sample URL: .../grouper/grouperUi/app/UiV2Main.index?operation=UiV2Subject.viewSubject&subjectId=ID_VALUE&sourceId=SOURCE_ID_NAME

 

And when I expand the "More v" section I do not see email or mail in there at all.

 

 

Just in case this is some kind of "Grouper cached data issue" I also looked up Subjects (users) that I have not used before (recently created in the data source with known good "mail" value) still no values in the New UI.

The Admin UI does show a "mail" value.

 

--

Carey Matthew

 

 

-----Original Message-----

From: Hyzer, Chris []

Sent: Tuesday, June 6, 2017 8:57 AM

To: Black, Carey M. <>;

Subject: RE: General Grouper question SMTP related stuff

 

Sorry, what specifically is not working when looking at the subject?

 

-----Original Message-----

From: Black, Carey M. []

Sent: Tuesday, June 06, 2017 12:10 AM

To: Hyzer, Chris <>;

Subject: RE: General Grouper question SMTP related stuff

 

Chris,

 

Thanks for the push in the right direction. I think we are getting somewhere.

 

Your snip did not work in GSH for me.

"

if (StringUtils.isBlank(emailAttributeName)) { System.out.println("Cant find email attribute name");} return System.out.println("Email address: " + subject.getAttributeValue(emailAttributeName);

// Error: unable to evaluate command: Sourced file: inline evaluation of: ``if (StringUtils.isBlank(emailAttributeName)) { System.out.println("Cant find ema . . . '' : Attempt to resolve method: isBlank() on undefined variable or class name: StringUtils "

--> I have no idea why "StringUtils" is not resolvable. ( I was running

--> this from the API bin dir. Missing dependency jar ?)

 

 

 

So I modified it a bit...

"

rootSession = GrouperSession.startRootSession();

me = findSubject("black.123");

String emailAttributeName = GrouperEmailUtils.emailAttributeNameForSource(me.getSourceId());

if (emailAttributeName == null) { System.out.println("Can not find email attribute name"); }else{System.out.println("emailAttributeName: " + emailAttributeName);} "

And was rewarded with this output:

 

emailAttributeName: mail

 

 

 

So it looks like the source think's that "mail" should be the attribute for the email address for the user. (Which is correct for the data source.)

 

Oh... and look at that... If I look at the Admin UI I see the value in it's table for my Subject. Interesting....

 

URL: .../grouper/populateSubjectSummary.do?sourceId=MYSOURCE&returnToLinkKey=subject.action.return-results&nameOverride=&returnTo=%2FdoSearchSubjects.do&name=MY_NAME&typeName=person&description=MYDESCRIPTION&descriptionOverride=&id=MY_SUBJECT_UNIQUEID&subjectType=person&subjectId= MY_SUBJECT_UNIQUEID "

mail       

"

 

 

Maybe it is a bug in the "New UI"?

                Subject Diagnostics is working

                Admin UI is working.

                New UI not working when looking at the subject.

 

 

--

Carey Matthew

 

-----Original Message-----

From: Hyzer, Chris []

Sent: Monday, June 5, 2017 10:48 PM

To: Black, Carey M. <>;

Subject: RE: General Grouper question SMTP related stuff

 

 

...snip...

 

> 2) On a related note...

>             I am still not seeing "email" values on subjects that are resolved by a GrouperJndiSourceAdapter.

>             I did add these settings. (found kind of randomly in various WIKI/list archives) but still no love.

> "

> <init-param>

>        <param-name>Email_AttributeType</param-name>

>        <param-value>mail</param-value>

>      </init-param>

>      <init-param>

>        <param-name>emailAttributeName</param-name>

>        <param-value>mail</param-value>

>      </init-param>

> .....

> <attribute>mail</attribute>

> "

>

> The subject API diagnostics page does show this:

>

> "

> Subject attribute 'mail' has 1 value: ''

>   - with subject.getAttributeValue("mail") "

 

What does this print?

 

    String emailAttributeName = GrouperEmailUtils.emailAttributeNameForSource(subject.getSourceId());

    if (StringUtils.isBlank(emailAttributeName)) {

      System.out.println("Cant find email attribute name");

    }

    return System.out.println("Email address: " + subject.getAttributeValue(emailAttributeName);

 

 

>

>

> So the SubjectAPI can retrieve the attribute but it is not "using it".

> ( Is this a bug or am I doing something wrong? Could it be an bug in

> the UI? )

 

 

First it needs to know which attribute is the email attribute

 

>

> Attached is screen capture of the header of my Subject being displayed in the UI.

>

> Thanks in advance.

>

-----Original Message-----

From: [] On Behalf Of Black, Carey M.

Sent: Monday, June 05, 2017 9:47 AM

To:

Subject: [grouper-users] General Grouper question SMTP related stuff

 

1) Is there a list of the emails that can be generated by the Grouper components?

                What triggers each email?

                Who the email is sent to?

                How to modify the text? (localization for branding/signing)

                etc.. etc...

 

Basically I would like to know what should be expected after the SMTP server is configured in the UI/WS/(other components?)

 

 

 

 

 

2) On a related note...

                I am still not seeing "email" values on subjects that are resolved by a GrouperJndiSourceAdapter.

                I did add these settings. (found kind of randomly in various WIKI/list archives) but still no love.

"

<init-param>

       <param-name>Email_AttributeType</param-name>

       <param-value>mail</param-value>

     </init-param>

     <init-param>

       <param-name>emailAttributeName</param-name>

       <param-value>mail</param-value>

     </init-param>

.....

<attribute>mail</attribute>

"

 

The subject API diagnostics page does show this:

 

"

Subject attribute 'mail' has 1 value: ''

  - with subject.getAttributeValue("mail") "

 

 

So the SubjectAPI can retrieve the attribute but it is not "using it". ( Is this a bug or am I doing something wrong? Could it be an bug in the UI? )

 

Attached is screen capture of the header of my Subject being displayed in the UI.

 

Thanks in advance.

 

--

Carey Matthew






Archive powered by MHonArc 2.6.19.

Top of Page