SetSubjectAttributes

Syntax

bool SetSubjectAttributes(MbId tMbSec, SubjectAttributesMd tArg)

Parameters

tMbSec. Repository connection moniker.

tArg. Operation execution parameters.

Description

The SetSubjectAttributes operation changes links between user attributes and attributes of external storage areas/domains with information about security subjects.

Comments

To execute the operation, in the tMbSec field specify repository connection moniker, and in the tArg.map field specify the collection of links between user attributes and attributes of external storage areas/domains. The moniker can be obtained on executing the OpenMetabase operation.

The operation results in the logical true if the list of attribute links was changed successfully.

Example

Below is the example of changing the list of links between user attributes and attributes of external storage areas/domains. The request contains the repository connection moniker and the updated list of attribute links. The response contains whether link attributes were changed successfully.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetSubjectAttributes xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMbSec xmlns="">
  <id>JCAEDGIAEJIIGOAEFHCJFBCOOJFHLPDECIEENLOPENFKIIGD!M</id>
  </tMbSec>
<tArg xmlns="">
<map>
<it>
<attrKey>
  <k>3</k>
  <id>EMAIL</id>
  </attrKey>
  <provider>1</provider>
  <extAttrName>EMAIL</extAttrName>
  </it>
<it>
<attrKey>
  <k>1</k>
  <id>ACCESS</id>
  </attrKey>
  <provider>1</provider>
  <extAttrName>USER_ACCESS</extAttrName>
  </it>
<it>
<attrKey>
  <k>3</k>
  <id>EMAIL</id>
  </attrKey>
  <provider>2</provider>
  <extAttrName>USER_EMAIL</extAttrName>
  </it>
<it>
<attrKey>
  <k>1</k>
  <id>ACCESS</id>
  </attrKey>
  <provider>2</provider>
  <extAttrName>USER_ACCESS</extAttrName>
  </it>
<it>
<attrKey>
  <k>3</k>
  <id>EMAIL</id>
  </attrKey>
  <provider>1</provider>
  <realm>SUBDOMAIN</realm>
  <extAttrName>EMAIL2</extAttrName>
  </it>
<it>
<attrKey>
  <k>1</k>
  <id>ACCESS</id>
  </attrKey>
  <provider>3</provider>
  <realm />
  <extAttrName>USER_ACCESS</extAttrName>
  </it>
  </map>
  </tArg>
  </SetSubjectAttributes>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetSubjectAttributesResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetSubjectAttributesResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetSubjectAttributes" :
{
"tMbSec" :
{
"id" : "JCAEDGIAEJIIGOAEFHCJFBCOOJFHLPDECIEENLOPENFKIIGD!M"
},
"tArg" :
{
"map" :
{
"it" :
[
{
"attrKey" :
{
"k" : "3",
"id" : "EMAIL"
},
"provider" : "1",
"extAttrName" : "EMAIL"
},
{
"attrKey" :
{
"k" : "1",
"id" : "ACCESS"
},
"provider" : "1",
"extAttrName" : "USER_ACCESS"
},
{
"attrKey" :
{
"k" : "3",
"id" : "EMAIL"
},
"provider" : "2",
"extAttrName" : "USER_EMAIL"
},
{
"attrKey" :
{
"k" : "1",
"id" : "ACCESS"
},
"provider" : "2",
"extAttrName" : "USER_ACCESS"
},
{
"attrKey" :
{
"k" : "3",
"id" : "EMAIL"
},
"provider" : "1",
"realm" : "SUBDOMAIN",
"extAttrName" : "EMAIL2"
},
{
"attrKey" :
{
"k" : "1",
"id" : "ACCESS"
},
"provider" : "3",
"realm" : "",
"extAttrName" : "USER_ACCESS"
}
]
}
}
}
}

JSON response:

{
"SetSubjectAttributesResult" : "1"
}
public static bool SetSubjectAttributes(string moniker, SubjectAttributeMapping[] newAttrMap)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
var tSet = new SetSubjectAttributes()
{
tArg = new SubjectAttributesMd()
{
map = newAttrMap
},
tMbSec = new MbId() { id = moniker }
};
// Get information about links between user attributes and attributes of external storage areas/domains
var result = somClient.SetSubjectAttributes(tSet);
return result;
}

See also:

Working with Repository