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." <>, "" <>
  • Subject: [grouper-users] RE: General Grouper question SMTP related stuff
  • Date: Tue, 6 Jun 2017 19:16:49 +0000
  • Accept-language: en-US
  • Authentication-results: osu.edu; dkim=none (message not signed) header.d=none;osu.edu; dmarc=none action=none header.from=isc.upenn.edu;
  • Ironport-phdr: 9a23:oNCiNREhv1CcUyScxVjpTZ1GYnF86YWxBRYc798ds5kLTJ76p864bnLW6fgltlLVR4KTs6sC0LuJ9f2xEjVbvd6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCzbL52Lhi6twXcu80ZjYd/JKs8xQbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDMi7mrZltJ/g75aoBK5phxw3YjUYJ2ONPFjeq/RZM4WSXZdUspUUSFKH4GyYJYVD+cZPehWsZTzp0cAoxW9CwmjBuLvxSNHiXLtx6I2z/gtHBva0AA8Ad4DtmnfotXvNKcVVOC41KfEwzfDbvJXxzj98pDEeQ0/rPGMR7JwcNHRxUcyHA7Ci1WftYzlPjOU1+sTqWiW9OtgVfmzhGI9tgFxuiagxsEqioXTmI0a103E+Dx/zY0oK9O4T0t7bsSlEJtWryyaNo12Qt88TGFyviY11KEGtYChcCcU1Zsn2hjSYOGEfYiQ+h/vSvyeLStliH9gZb6zmgu+/E2uyuDzSsW4zFNHoyhbndTDtX0A0hne5tabRvdj5kutxDiC2xzJ5uxAPEw4j7TXJ4Mlz7Iqi5Yes0XOEynrk0vslqCWbF8r+u2w5uTnfLrmopicOpdshAziNaoihsKyDf0mPwYXQmSX4OO826b98kHjR7VKk+E2nbLesJDHI8QUu7S1AxdP0oYk9xawESup0MgZnXkAKlJJYhWHj5X1O1HKJ/D4CvS/j06wnzdswvDKJrzhApPTIXjfiLrtY6xy51JBxAc20NxT+o9YB7QPIP/8RkP9qNnVAx0nPAG7wOvqDdBw2p0CVW6RGqOZNbndsV6M5uIhOemMY4oVtS74K/c55/7vjX44lkEHfaSy3JsXc2y3Eu57I0WBf3XshNEBHX0UsQUjUezmkEeCXiJLZ3auQ6I84Sk2CI28DYfEW4CtmKKO3D2iEp1LfWBJFEqMEWzzeoWAWvcMcz6SItR/njAeVLihTZMh2g+0tA/81bVnMvTY9jcGup3+ydgmr9HUwFsY8TV/DIDV+GiXQnA8uyVCD2s82Kl0ogokkAyr1rNlxfFUCIoXr7lGSAAnLZPGivFhBsrpcgPHYtqTTlu6GJOrDSx7BoY+2dgTe0tnXsi5gwrY9yusH7IPkbGXXto5/r+KjFbrIMMogVbXxqQ7yxENQtFOLifu0qt09xnBCpThkl6S0buyeKIamiPB6THQniK1oEhEXVsoAu3+VncFax6T9Iyh6w==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

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. [mailto:]
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