Authentication

Build tasks exposed by the grunt-vb-build package use OAuth access tokens to authenticate calls to Visual Builder instances. There are multiple ways to tell a Grunt task to obtain this access token:

  • Explicitly pass an OAuth access token through the --accessToken option. To get an access token, access your application's Settings editor, then click Business Objects. Click Get Access Token and look for the Access Token Value. You can now use the access token's value in the build task for authentication, for example:
    ./node_modules/.bin/grunt vb-deploy \
        --url=https://vbruntime-instance.example.com/ic/builder/ \
        --accesstoken=eyJ4NXQjUzI1NiI6IlVub283NXlZaUtqdXJ2Z3dDMW4tRHdqM1NWRFIwSGRwdVRvd045c3NTWGsiLCJ4NXQiOiI5bEFQMTMxSWFuY1BQbFRQdnA3dWRZb2JkZFkiLCJraWQiOiJTSUdOSU5HX0tFWSIsImFsZyI6I... \
        --id=helloworld \
        --ver=1.0
  • Use Basic authentication for the Visual Builder instance through the --username and --password options, for example:
    ./node_modules/.bin/grunt vb-deploy \
        --url=https://vbruntime-instance.example.com/ic/builder/ \
        --username=mary.jane@example.com \
        '--password=***' \
        --id=helloworld \
        --ver=1.0
  • Use Oracle Identity Cloud Service (IDCS) integration through the --username, --password, --idcsClientId, --idcsClientSecret, and --idcsScope options
    This table describes the authentication options when you use IDCS to get the OAuth access token:
    Name Mandatory Default Value Description
    url[:dt] no n/a URL of the Visual Builder design-time service. The :dt suffix is optional.
    username[:dt] no n/a The username used to obtain an OAuth access token for further communication with Visual Builder services. The :dt suffix is optional.
    password[:dt] no n/a The password used to obtain an OAuth access token for further communication with Visual Builder services. The :dt suffix is optional.

    A password specified via the --password Grunt option may need to be enclosed in single quotation marks (') if it contains special characters. In general, it's advisable to always use quotation marks for the --password option, especially in VB Studio jobs where the password is provided via a job variable. For example: grunt vb-deploy '--password=Jkl@#&!%^23' ....

    idcsClientId no n/a IDCS client ID (username)
    idcsClientSecret no n/a IDCS client secret (password)
    idcsScope no n/a IDCS scope
    For example:
    ./node_modules/.bin/grunt grunt vb-deploy \
    --url=https://vbdesigntime-instance.example.com/ic/builder/ \
    --username=mary.jane@example.com \
    '--password=***' \
    --idcsUrl=https://idcs-xxxxx14a21d74e72baf5a26c65900c12.identity.dev.ocqadev.com \
    --idcsClientId=5b4e306598374529959bc8e18c91a86e \
    '--idcsClientSecret=****'\'
    --idcsScope=https://AB2C5D66E78F4GHI83J9304219KL8939.integration.test.ocp.oc-test.com:443urn:opc:resource:consumer::all'\
    --id=test \
    --ver=1.0