Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Before starting to make sure you have a working development environment.

...

For the purposes of this document, the manual consumer configuration process is described.

...

  1. Login to the SDC Rackspace VM
  2. Copy the file security-utils-1610.2.1.jar to the VM under /tmp
  3. Run the following commands from the Docker, providing consumer specific values for the parameters that are inside <>:

    Code Block
    languagebash
    Consumers creation, Run From Docker (Change the marked in yellow):
    consumerName=<Consumer user name> (For example: appc )
    user_pass=<Consumer password> (For example: appcos )
    IP=localhost <OR Docker IP>
    enc_pass=`java -cp /tmp/security-utils-*.jar org.openecomp.sdc.security.Passwords $user_pass |tr '[]' ' '|awk '{print $1}'`
    salt=`echo $enc_pass |awk -F: '{print $1}'
    pass=`echo $enc_pass |awk -F: '{print $2}'
    
    
    curl -X POST -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "HTTPUSER_CSP_ATTUIDID: jh0003" http://$IP:8080/sdc2/rest/v1/consumers/ -d '{"consumerName": '$consumerName', "consumerSalt": '$salt',"consumerPassword": '$pass'}'
    Note

    Note: Repeat the consumer creation process for each consumer, providing Consumer specific consumerName and user_pass


    For Eample:

    Code Block
    consumerName=appc
    user_pass=appcos
    enc_pass=`java -cp /tmp/security-utils-1702.0.11.jar org.openecomp.sdc.security.Passwords $user_pass |tr '[]' ' '|awk '{print $1}'`
    salt=`echo $enc_pass |awk -F: '{print $1}'`
    pass=`echo $enc_pass |awk -F: '{print $2}'`
    
    curl -X POST -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "HTTPUSER_CSP_ATTUIDID: jh0003" http://localhost:8080/sdc2/rest/v1/consumers/ -d '{"consumerName": '$consumerName', "consumerSalt": '$salt',"consumerPassword": '$pass'}'
  4. Check that the consumer was successfully created in SDC:

    Code Block
    curl -X GET -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "HTTPUSER_CSP_ATTUIDID: jh0003" http://localhost:8080/sdc2/rest/v1/consumers/<consumerName>
    HTTP/1.1 200 OK
    Set-Cookie: JSESSIONID=1ahpyqpjjgfblahos4f03qun9;Path=/
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Content-Type: application/json;charset=UTF-8
    X-ECOMP-RequestID: 6e47cbde-44e8-4b82-8f17-c6a731bf0081
    Vary: Accept-Encoding, User-Agent
    Content-Length: 268
    Server: Jetty(9.3.12.v20160915)
    
    {"consumerName":"vid","consumerPassword":"3936abc03d50693c90ec68a4a60427d6bdde8b085d60314333c9e58a270ff6f3","consumerSalt":"eaa62d9681d8f803ac05db342e3c9cc0","consumerLastAuthenticationTime":0,"consumerDetailsLastupdatedtime":1481211500749,"lastModfierAtuid":"jh0003"}