Step 2: Preparing Your Applications
Creating Your Applications
In this step you will create your Producer and Consumer applications in Self-Service to make sure that your actual application is authorized to both produce and consume from the stream you have just created.
Log in to the Self-Service portal using the credentials supplied by Axual. The following screen will be shown:
-
Click "Applications" (displayed in the picture above) followed by "New application"
-
Define a name for your application, e.g. "my_producer"
-
Enter a relevant description of your application
-
Select "AO Group" as your team
-
Select "Java" as the application type
-
Leave visibility to "Public"
-
Click "Create application" to create the application
You will see that the stream is created, but a principal needs to be added for the "Getting Started" environment.
Configuring The Application
The application principal is used to authorize the application to use the stream (either producing or consuming). The principal is formed by the Distinguished Name (DN) of the certificate used by the application.
For every distinct environment, a principal needs to be defined. Without a principal, an application can not have consumer or produce access to a stream. |
To configure the application principal on the selected environment:
-
Visit the detail page of the application.
-
Select the environment for which you want to configure the principal.
-
Click on the Configure button in the application box. You will see a modal as below:
-
Upload the PEM file of your application certificate, see "Generating A Certificate PEM File"
-
The certificate chain will be shown. Confirm that the uploaded certificate matches the certificate you will use for your application in the corresponding environment.
-
Click on Save.
The application box name will turn green indicating that the application is configured properly on that environment. Above steps can be repeated for different environments where application is required to access the stream.
Repeat the steps above for your Consumer application, and name it "my_consumer" |
Requesting Stream Access
Once you’ve added a principals for your applications you will need to request access to the stream:
-
Click + Add Request
-
Click Producer or Consumer in the "Application Type" section, depending on whether you are creating a request for your producer or consumer app.
-
Select "my-example-stream" in the "Stream" dropdown
-
Select Getting Started in the "On environment" dropdown
You should now have a modal that is configured as follows:
Finally click Request Approval and the applications access will be automatically accepted and our application will be producing to our stream, you can follow the same process as above for configuring a Consumer it just requires changing the Application Type.
Once you’ve successfully requested access and it’s showing as approved your ready to move onto the next step 3. Producing Data