Topics
Prev Next

User Credentials in a Security Enabled Model

If the model connected via Pro Cloud Server has User Security enabled, then you will have to validate the user credential before creating a Resource or Resource Feature. Once the user credential is validated, you will be provided with a User Security GUID that you will have to pass-in with the OSLC GET and POST Requests. Unless you pass-in the User Security GUID, the OSLC request on a Security Enabled model will not be processed by the Pro Cloud Server.

To get the User Security GUID:

  • POST the User credentials (User ID and Password) to a specific URL; these are the same credentials that you will type into the 'Login to EA Repository' dialog in a security-enabled model
  • Upon successful validation, the XML returned will contain the User Security GUID (amongst other information) in the XML element 'ss:useridentifier'

Validating User Credentials in a Security Enabled Model

Step

Action

1

Validate the User by POSTing to:

     URL: <protocol>://<server>/<model_name>/oslc/am/login/

     POST Body: uid=<USER ID>;pwd=<PASSWORD>

2

If user validation succeeds, the response will typically be:

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

                 xmlns:ss="http://www.sparxsystems.com.au/oslc_am#"

                 xmlns:foaf="http://xmlns.com/foaf/0.1/">

     <ss:login>

          <!--boolean value that specifies whether the model allows Resource Creation/Update--> <ss:readonlymodel>VALUE</ss:readonlymodel>

          <!--boolean value that specifies whether you have valid Pro Cloud Server license--> <ss:validlicense>VALUE</ss:validlicense>  

          <!--<!--specifies the Full Name of the User in a Security Enabled Model--> <ss:userfullname>

               <foaf:Person>

                    <foaf:name>Web User</foaf:name>

               </foaf:Person>

          </ss:userfullname>

          <!--specifies the User Security GUID--> <ss:useridentifier>USER GUID</ss:useridentifier>

          <!--boolean value that specifies whether you have permission to create/update Resources--> <ss:elementpermission>VALUE</ss:elementpermission>

          <!--boolean value that specifies whether you have permission to create/update Resource Tests--> <ss:testpermission>VALUE</ss:testpermission>

          <!--boolean value that specifies whether you have permission to create/update Resource Allocations--> <ss:resourceallocationpermission>VALUE</ss:resourceallocationpermission>

          <!--boolean value that specifies whether you have permission to create/update Resource Maintenance Items--> <ss:maintenanceitempermission>VALUE</ss:maintenanceitempermission>

          <!--boolean value that specifies whether you have permission to create/update Resource Project Management Items--> <ss:projectmanagementitempermission>VALUE</ss:projectmanagementitempermission>

     </ss:login>

</rdf:RDF>

Passing User Security GUID with OSLC Requests

Once the User Credential is successfully validated, you pass in the User Security GUID in every OSLC request; that is, pass-in the User Security GUID:

  • When retrieving a Resource or Resource Feature XML using GET Request as the value of the query string parameter 'useridentifier'
  • When creating/updating a Resource or Resource Feature using POST RDF/XML as the value of the XML element 'ss:useridentifier'

Passing User Security GUID with GET Requests

For GET requests, pass-in the User Security GUID as the value of the query string parameter 'useridentifier':

  • <protocol>://<server>/<model_name>/oslc/am/OSLC REQUEST/?useridentifier=<USER GUID>

Examples

No.

Example

1

Retrieve the Properties of an Enterprise Architect Package Resource:

  • Whose GUID is {5147E138-1F14-4738-B721-5FCC0F8821A8}
  • In a Security Enabled model
  • Where the User Security GUID is {72825AF9-E116-48f1-9DF8-77815E66B1A7}

http://localhost:480/firebird_model/oslc/am/resource/pk_{5147E138-1F14-4738-B721-5FCC0F8821A8}/?useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}

2

Retrieve all Resources:

  • With the name Class1
  • In a Security Enabled model
  • Where the User Security GUID is {72825AF9-E116-48f1-9DF8-77815E66B1A7}

http://localhost:480/firebird_model/oslc/am/qc/?useridentifier={72825AF9-E116-48f1-9DF8-77815E66B1A7}&oslc.where=dcterms:title="Class1"

Passing in a User Security GUID with OSLC POST Requests

For OSLC POST requests, you need to pass-in the User Security GUID as a part of the RDF/XML accompanying the POST request.

Examples

No.

Example

1

In a Security Enabled model where the User Security GUID is {72825AF9-E116-48f1-9DF8-77815E66B1A7}, a Class 'Class1' is created under a Package with the Enterprise Architect GUID {965A54C2-6A89-46d7-AB7E-F192668010CA}. The Notes, Complexity and Version are set.

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"

                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

                xmlns:dcterms="http://purl.org/dc/terms/"

                xmlns:foaf="http://xmlns.com/foaf/0.1/"

                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">

     <oslc_am:Resource>

          <!--Required Properties-->

          <dcterms:title>Class1</dcterms:title>

          <dcterms:type>Class</dcterms:type>

          <ss:parentresourceidentifier>pk_{259A54C2-6A89-46d7-AB7E-F192668010CA}</ss:parentresourceidentifier>     

          <dcterms:description>Created via OSLC</dcterms:description>

          <ss:complexity>Easy</ss:complexity>

          <ss:version>1.0</ss:version>

          <ss:useridentifier>{72825AF9-E116-48f1-9DF8-77815E66B1A7}</ss:useridentifier>

     </oslc_am:Resource>

</rdf:RDF>

2

In a Security Enabled model with the User Security GUID {72825AF9-E116-48f1-9DF8-77815E66B1A7}, an Actor 'Actor1' with the Enterprise Architect GUID {567854C2-6A89-46d7-AB7E-F192668010CA} has its name updated to 'Actor 1_New'.

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"

                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

                xmlns:dcterms="http://purl.org/dc/terms/"

                xmlns:foaf="http://xmlns.com/foaf/0.1/"

                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">

     <oslc_am:Resource>

          <!--Required Properties-->

          <dcterms:identifier>el_{567854C2-6A89-46d7-AB7E-F192668010CA}</dcterms:identifier>   

          <dcterms:title>Actor1_New</dcterms:identifier>

          <ss:useridentifier>{72825AF9-E116-48f1-9DF8-77815E66B1A7}</ss:useridentifier>

     </oslc_am:Resource>

</rdf:RDF>

Notes

  • This facility is available through the Enterprise Architect Pro Cloud Server
  • An OSLC request will not be processed by the Pro Cloud Server unless the User Security GUID is passed-in with the OSLC request on a Security Enabled model
  • 30 minutes of inactivity will log you out of a Security Enabled model; you will have to login again by POSTing the User Credentials to the credential validation URL

Learn more