Grouper WS /grouperPrivileges fails to remove privilege from unresolvable subject

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Component/s: WS
    • None

      We're trying to remove admin privileges from an unresolvable subject through the WS. Here's the excerpt from a call to get privileges:

      Request:
      POST /servicesRest/2_4_000/grouperPrivileges HTTP/1.1
      User-Agent: HTTPie/0.9.8
      Accept-Encoding: gzip, deflate
      Accept: application/json, */*
      Connection: keep-alive
      Content-Type: application/json
      Content-Length: 218
      Authorization: Basic Z3JvdXBlcnN5c3RlbTo4TnRoM3FYQ2hzZnhDdXdRY3RDSnJpZklO
      Host: grouper-ws.dev.umd.edu{
        "WsRestGetGrouperPrivilegesLiteRequest":{
          "groupName":"SIMS Groups:ldap:group:test-remove-admin",
          "actAsSubjectId":"GrouperSystem",
          "privilegeType":"access",
          "includeGroupDetail" : "false"
        }
      }
      //Response excerpt...
      {
                      "allowed": "T",
                      "ownerSubject": {
                          "id": "872223700",
                          "name": "872223700 entity not found",
                          "resultCode": "SUCCESS",
                          "sourceId": "ldap",
                          "success": "T"
                      },
                      "privilegeName": "read",
                      "privilegeType": "access",
                      "revokable": "T",
                      "wsGroup": {
                          "description": "A description",
                          "displayExtension": "test-remove-admin",
                          "displayName": "SIMS Groups:ldap:group:test-remove-admin",
                          "extension": "test-remove-admin",
                          "idIndex": "53443",
                          "name": "SIMS Groups:ldap:group:test-remove-admin",
                          "typeOfGroup": "group",
                          "uuid": "7862d89893a84c04b3bdf93f57d6b01b"
                      },
                      "wsSubject": {
                          "id": "872223700",
                          "name": "872223700 entity not found",
                          "resultCode": "SUCCESS",
                          "sourceId": "ldap",
                          "success": "T"
                      }
                  },
      //... 

      Now if I try to remove their privileges via /grouperPrivileges, I get an entity not found error:

      Accept: application/json, */*
      Accept-Encoding: gzip, deflate
      Authorization: Basic Z3JvdXBlcnN5c3RlbTo4TnRoM3FYQ2hzZnhDdXdRY3RDSnJpZklO
      Connection: keep-alive
      Content-Length: 258
      Content-Type: application/json
      Host: grouper-ws.dev.umd.edu
      User-Agent: HTTPie/0.9.8{
          "WsRestAssignGrouperPrivilegesLiteRequest": {
              "actAsSubjectId": "GrouperSystem",
              "allowed": "F",
              "groupName": "SIMS Groups:ldap:group:test-remove-admin",
              "privilegeName": "admin",
              "privilegeType": "access",
              "subjectId": "812771089"
          }
      }HTTP/1.1 404 404
      Connection: keep-alive
      Content-Length: 770
      Content-Type: application/json;charset=UTF-8
      Date: Mon, 25 Nov 2019 19:12:21 GMT
      Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
      Set-Cookie: AWSALB=951gQGjdLt0BkX47L1Acrhb1cHGoOXYjG231VJA/BjLARg0m5+33/ZFZWh0CYxvKznocndeXVv9ywaeY9lkZPDRyJw6XvM6EKe4p7RvwvIwSTKTY8voBx/t9aZQS; Expires=Mon, 02 Dec 2019 19:12:20 GMT; Path=/
      Set-Cookie: JSESSIONID=D86F65CBA852987A0A7892672BA710E2;path=/grouper-ws;HttpOnly
      Via: 1.1 grouper-ws.dev.umd.edu
      X-Grouper-resultCode: SUBJECT_NOT_FOUND
      X-Grouper-resultCode2: NONE
      X-Grouper-success: F{
          "WsAssignGrouperPrivilegesLiteResult": {
              "responseMetadata": {
                  "millis": "388",
                  "serverVersion": "2.4.0"
              },
              "resultMetadata": {
                  "resultCode": "SUBJECT_NOT_FOUND",
                  "resultMessage": "There were 0 successes and 1 failures of users assigned privileges.Subject: WsSubjectLookup[\n  cause=edu.internet2.middleware.subject.SubjectNotFoundException: subject not found: 812771089,\n  subjectFindResult=SUBJECT_NOT_FOUND,subjectId=812771089] had problems: SUBJECT_NOT_FOUND",
                  "success": "F"
              },
              "wsGroup": {
                  "description": "A description",
                  "displayExtension": "test-remove-admin",
                  "displayName": "SIMS Groups:ldap:group:test-remove-admin",
                  "extension": "test-remove-admin",
                  "idIndex": "53443",
                  "name": "SIMS Groups:ldap:group:test-remove-admin",
                  "typeOfGroup": "group",
                  "uuid": "7862d89893a84c04b3bdf93f57d6b01b"
              }
          }
      }
       

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Alex Poulos (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: