Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Web services case sensitive with 2.2.1

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Web services case sensitive with 2.2.1


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Dorsey Dick <>, "" <>
  • Subject: [grouper-users] RE: Web services case sensitive with 2.2.1
  • Date: Tue, 27 Jan 2015 20:29:56 +0000
  • Accept-language: en-US

uh...  I dont know how Grouper could ever be case insensitive... are you using the same database and settings?  Are there databases that do case insensitive like strings if you dont do upper() or lower()?

 

We have 2.1 in prod at Penn and I tried it and it is case sensitive.  Also, you can create two groups with different case so Grouper must be case sensitive searching for groups by name...

 

/*******************************************************************************

* Copyright 2012 Internet2

*

 * Licensed under the Apache License, Version 2.0 (the "License");

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

 *   http://www.apache.org/licenses/LICENSE-2.0

*

 * Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

* See the License for the specific language governing permissions and

* limitations under the License.

******************************************************************************/

/**

* @author mchyzer

* $Id$

*/

package edu.internet2.middleware.grouperClient.poc;

 

import edu.internet2.middleware.grouper.util.GrouperUtil;

import edu.internet2.middleware.grouper.ws.GrouperWsConfig;

import edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.Credentials;

import edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpClient;

import edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpMethod;

import edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.UsernamePasswordCredentials;

import edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.auth.AuthScope;

import edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.GetMethod;

 

 

/**

* run a manual web service

*/

public class WsParamsRestPoc {

 

  /**

   * @param args

   * @throws Exception

   */

  public static void main(String[] args) throws Exception {

 

    String user = GrouperWsConfig.retrieveConfig().propertyValueString("testUser");

    String pass = GrouperWsConfig.retrieveConfig().propertyValueString("testPass");

   

    HttpClient httpClient = new HttpClient();

    HttpMethod httpMethod = new GetMethod("https://our.grouper.url.upenn.edu/grouperWs/servicesRest/json/v2_1_001/groups/test%3AtestGroup/members?wsLiteObjectType=WsRestGetMembersLiteRequest&subjectAttributeNames=PENNNAME");

    Credentials defaultcreds = new UsernamePasswordCredentials(user, pass);

 

    httpClient.getState()

      .setCredentials(new AuthScope("grouperws.apps.upenn.edu", 443), defaultcreds);

    httpClient.getParams().setAuthenticationPreemptive(true);

    httpClient.executeMethod(httpMethod);

    String result = httpMethod.getResponseBodyAsString();

    System.out.println(GrouperUtil.indent(result, false));

  }

 

}

 

 

this is with the right name:

 

 

{

  "WsGetMembersLiteResult":{

    "responseMetadata":{

      "millis":"182",

      "serverVersion":"2.1.1"

    },

    "resultMetadata":{

      "resultCode":"SUCCESS",

      "resultMessage":"Success for: clientVersion: 2.1.1, wsGroupLookups: Array size: 1: [0]: WsGroupLookup[pitGroups=[],groupName=test:testGroup]\n\n, memberFilter: All, includeSubjectDetail: false, actAsSubject: null, fieldName: null, subjectAttributeNames: Array size: 1: [0]: PENNNAME\n\n, paramNames: \n, params: null\n, sourceIds: null\n, pointInTimeFrom: null, pointInTimeTo: null",

      "success":"T"

    },

    "subjectAttributeNames":[

      "PENNNAME"

    ]

    ,

    "wsGroup":{

      "description":"testGroup",

      "displayExtension":"testGroup",

      "displayName":"test:testGroup",

      "extension":"testGroup",

      "name":"test:testGroup",

      "typeOfGroup":"group",

      "uuid":"dbfa18c3-a025-47b6-a9a0-be5ac02e8270"

    },

    "wsSubjects":[

      {

        "attributeValues":[

          "mchyzer"

        ]

        ,

        "id":"10021368",

        "name":"Chris Hyzer",

        "resultCode":"SUCCESS",

        "sourceId":"pennperson",

        "success":"T"

      }

    ]

  }

}

 

 

this is with

 

 

    HttpMethod httpMethod = new GetMethod("https://our.grouper.url.upenn.edu/grouperWs/servicesRest/json/v2_1_001/groups/Test%3AtestGroup/members?wsLiteObjectType=WsRestGetMembersLiteRequest&subjectAttributeNames=PENNNAME");

 

 

 

{

  "WsGetMembersLiteResult":{

    "responseMetadata":{

      "millis":"128",

      "serverVersion":"2.1.1"

    },

    "resultMetadata":{

      "resultCode":"GROUP_NOT_FOUND",

      "resultMessage":"There were 0 successes and 1 failures of getting members for groups.Invalid group for 'wsGroupLookup', WsGroupLookup[pitGroups=[],groupName=Test:testGroup,\n  groupFindResult=GROUP_NOT_FOUND], WsGroupLookup[pitGroups=[],groupName=Test:testGroup,\n  groupFindResult=GROUP_NOT_FOUND], null",

      "success":"F"

    },

    "subjectAttributeNames":[

      "PENNNAME"

    ]

  }

}

 

 

this is with:

 

    HttpMethod httpMethod = new GetMethod("https://our.grouper.url.upenn.edu/grouperWs/servicesRest/json/v2_1_001/groups/test%3ATestGroup/members?wsLiteObjectType=WsRestGetMembersLiteRequest&subjectAttributeNames=PENNNAME");

 

 

{

  "WsGetMembersLiteResult":{

    "responseMetadata":{

      "millis":"106",

      "serverVersion":"2.1.1"

    },

    "resultMetadata":{

      "resultCode":"GROUP_NOT_FOUND",

      "resultMessage":"There were 0 successes and 1 failures of getting members for groups.Invalid group for 'wsGroupLookup', WsGroupLookup[pitGroups=[],groupName=test:TestGroup,\n  groupFindResult=GROUP_NOT_FOUND], WsGroupLookup[pitGroups=[],groupName=test:TestGroup,\n  groupFindResult=GROUP_NOT_FOUND], null",

      "success":"F"

    },

    "subjectAttributeNames":[

      "PENNNAME"

    ]

  }

}

 

 

 

 

From: Dorsey Dick [mailto:]
Sent: Tuesday, January 27, 2015 11:16 AM
To: Chris Hyzer;
Subject: Re: Web services case sensitive with 2.2.1

 

Our production systems runs 2.1.4, there I’m able to search for groups and the group I put in the URL is case insensitive, I’m able to switch any character to any case and still get results back. When I try to do the same in our test system, which runs 2.2.1, I receive an error GROUP_UUID_DOESNT_MATCH_NAME.

 

Test will only work when fetching the below URL:

/grouper-ws/servicesRest/v2_1_005/groups/Apps%3AProvisioning%3Aauto%3ASuspended-Expires-DeleteDate/members

 

While production will work with any of the below URL’s:

grouper-ws/servicesRest/v2_1_005/groups/APPS%3Arovisioning%3Aauto%3Asuspended-expires-deletedate/members

grouper-ws/servicesRest/v2_1_005/groups/apps%3Aprovisioning%3Aauto%3Asuspended-expires-deletedate/members

grouper-ws/servicesRest/v2_1_005/groups/APPS%3Aprovisioning%3AAUTO%3Asuspended-expires-deletedate/members

 

 

 

From: Chris Hyzer <>
Date: Tuesday, January 27, 2015 at 10:45 AM
To: Dorsey Dick <>, "" <>
Subject: RE: Web services case sensitive with 2.2.1

 

They were always case sensitive...  can you give more info about how things are different?

 

Thanks,

Chris

 

From: [] On Behalf Of Dorsey Dick
Sent: Tuesday, January 27, 2015 10:43 AM
To:
Subject: [grouper-users] Web services case sensitive with 2.2.1

 

Hello,

 

We recently upgraded to grouper 2.2.1 in our test environment. Looking at the web services it seems the group names are now case sensitive when using then in a URL when they were not before. Is there anyway to change the behavior to have them be case insensitive? As we are currently trying to meet a deadline the favor of a quick reply is greatly appreciated.

 

Thanks,

Dorsey




Archive powered by MHonArc 2.6.16.

Top of Page