OAuth with REST consumer

Options

hi,

I am using Solace Event Broker Version9.10.0.21; I am trying to set up Azure function as one on of the consumers but it should use OAuth for authentication. What all setup I should do, please advice as I am new to Solace.

  1. Do I have to enable OAuth Provider Authentication at the service level a first step ?
  2. Then in the broker, do I need to register the OAuth provider under --> Access Control --> Client authentication --> OAuth provider ?
  3. under OAuth provider page there are may section, do I need to fill all?
  4. Then under my rest consumer --> OAuth Options do I need to give the JWT token

pl advice.

Answers

  • rtomkins
    rtomkins Member, Employee Posts: 24 Solace Employee
    Options

    Hi anithamartin,

    I'm Rob Tomkins, a product manager with Solace. We have a number of good examples of how to Set Up Azure Functions to connect through an RDP. Probably the easiest way to set this up is to use the PubSub+ Manager Wizard for Azure Functions. Here is the link that the Solace Connector Hub provides to help you configure your RDP connection to Azure Functions. This page has links to video demonstrations of how to do it and as well as a documentation page. You do indeed need to have Azure Functions up and running and have access to your credentials prior to configuring the broker.

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 500 admin
    Options

    You can also take a look at this Live coding demo video

    Minute 36:00 is when we configure the azure function using the Wizard the Rob referred to

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 500 admin
    Options

    Hey @anithamartin, it has been pointed out to me by my colleague @pkondrat that the wizard walks you through configuring the RDP with the API key to authenticate with the function endpoint. You have a couple of options to configure OAuth for outbound client connections (as in the case for your implementation)

    1. Follow the steps here https://docs.solace.com/Configuring-and-Managing/Managing-RDPs.htm#managing_rest_messaging_1948951837_1004979 under "OAuth Client Authentication"
    2. Or follow the steps in the PubSub+ Manager Wizard for Azure Functions to create your RDP, the navigate to Clients --> REST, choose your RDP, and under REST consumers chose your REST consumer and you can configure your OAuth options from there
  • ProsenjitDas
    ProsenjitDas Member Posts: 20 ✭✭
    Options

    Hi @Tamimi

    Continuing the above discussion can you please guide what will be the value of below parameters while connecting Azure function via solace RDP using "OAuth 2.0 Client Credentials Authentication"

    Client ID

    Token Endpoint URL

    Scope

    =============================

    Note: I still can use the Client Id, Token URL from Azure app registration but not sure about the Scope.

    The connection is failing while using OAuth 2.0 Client Credentials Authentication but it's working fine with Http Header auth.