To create a user with the Operator role in the target Oracle GoldenGate deployment for the distribution path, you can use the POST operation on the /services/{version}/authorizations/{role}/{user} endpoint. The API version is v2. You need to specify the role as Operator and the desired user name in the path parameters.

The request body should contain details of the user you want to create. Based on the ogg:usersRole schema and the ogg:userRole schema, the request body is expected to be a JSON object that specifies the user details.

Here is an example curl command to create a user named distop with the role Operator:

curl -i -X POST \
-H "Content-Type: application/json" \
-u <username>:<password> \
-d '{
  "type": "Basic",
  "user": "distop",
  "info": "Operator user for distribution path",
  "credential": "passwordfordistop"
}' \
http://<hostname>:<port>/services/v2/authorizations/Operator/distop

Explanation of the command:

  • curl -i -X POST: This initiates a POST request with curl. The -i option includes the HTTP headers in the output.
  • -H “Content-Type: application/json”: This sets the Content-Type header to indicate that the request body is in JSON format.
  • -u :: Replace with your Oracle GoldenGate Service credentials, which must have the Security role to perform this operation.
  • -d ‘{ … }’: This provides the JSON request body.
    • “type”: “Basic”: Specifies the type of user.
    • “user”: “distop”: The name of the user you want to create.
    • “info”: “Operator user for distribution path”: An optional description or information about the user.
    • “credential”: “passwordfordistop”: The password for the user.
  • http://:/services/v2/authorizations/Operator/distop: Replace with the actual hostname and port of your target Oracle GoldenGate Service. Operator is the role being assigned, and distop is the username being created.

A successful request will likely return a 201 Created status code, indicating that the user has been created and assigned the Operator role.

This approach creates an “Authorization User Resource”, effectively adding a user and associating it with the Operator role in the Oracle GoldenGate security framework. This user can then be used for authentication and authorization purposes when configuring your distribution path to connect to the target GoldenGate instance.

https://docs.oracle.com/en/middleware/goldengate/core/23/oggra

Quote of the week

“Control what I can control”

~ Alex Lima