...
Code Block |
---|
# there can be multiple entries, "wsMessagingBridge" is the name of this one, change that for each config section
# the messaging system name must correspond to a messaging system in the grouper.client.properties
grouper.webservice.messaging.wsMessagingBridge.messagingSystemName = grouperBuiltinMessaging
# the queue or topic to check
grouper.webservice.messaging.wsMessagingBridge.queueOrTopicName = sampleWsMessagingQueue
# if this is a "queue" or "topic", generally it will be queue
grouper.webservice.messaging.wsMessagingBridge.messageQueueType = queue
# the source id of the source of the user to act as
grouper.webservice.messaging.wsMessagingBridge.actAsSubjectSourceId = g:isa
# the subject id of the user to act as
grouper.webservice.messaging.wsMessagingBridge.actAsSubjectId = GrouperSystem
# the number of seconds between checking the queue or topic
grouper.webservice.messaging.wsMessagingBridge.secondsBetweenChecks = 0
# the long polling seconds, listen to the queue for this many seconds for messages
grouper.webservice.messaging.wsMessagingBridge.longPollingSeconds = 20
|
That will cause all WS servers to listen on a queue or topic for messages
Note, you need to configure the grouper act as too
Code Block |
---|
# similar syntax as ws.act.as.group but for the grouper actas (e.g. for grouper messaging to WS bridge)
# Web service users who are in the following group can use the actAs field to act as someone else
# You can put multiple groups separated by commas. e.g. a:b:c, e:f:g
# You can put a single entry as the group the calling user has to be in, and the grouper the actAs has to be in
# separated by 4 colons
# e.g. if the configured values is: a:b:c, e:f:d :::: r:e:w, x:e:w
# then if the calling user is in a:b:c or x:e:w, then the actAs can be anyone
# if not, then if the calling user is in e:f:d, then the actAs must be in r:e:w. If multiple rules, then
# if one passes, then it is a success, if they all fail, then fail.
ws.grouper.act.as.group = |
Sample message input
Code Block |
---|
{ "grouperHeader": { "messageVersion": "1", //mandatory "timestampInput": "2017-07-23T18:25:43.511Z", //timestamp message sent, mandatory "type": "grouperMessagingToWebService", //says what type of message, mandatory "endpoint": "WsRestAddMemberRequest", //which endpoint, mandatory, matches the container name below "messageInputUuid": "abc123", //for logging, mandatory, make up a uuid "replyToQueueOrTopicName": "someQueue", //if replying, optional "replyToQueueOrTopic": "queue", //if replying, "queue" or "topic", optional "httpMethod": "PUT", //http method that would be in WS, mandatory "httpPath": "http://locahost:8085/grouper-ws/servicesRest/v2_2_000/groups" //http path that would be in the WS, mandatory }, // this is simply the json body of any grouper json web service normal or lite "WsRestAddMemberRequest":{ "subjectLookups":[ { "subjectId":"test.subject.0", "subjectSourceId":"jdbc" } ] , "wsGroupLookup":{ "groupName":"test:testGroup" } } } |
...