ODBC Driver for Avro

Build 24.0.9060

Create a Custom OAuth App

Creating a Custom OAuth Application

CData embeds OAuth Application Credentials with CData branding that can be used when connecting via a desktop application or headless application.

You may choose to use your own OAuth Application Credentials when you want to:

  • control branding of the authentication dialog
  • control the redirect URI that the application redirects the user to after the user authenticates
  • customize the permissions that you are requesting from the user

Procedure

This procedure creates a custom OAuth application, registers that application, and generates values that are used to configure the OAuthClientId and OAuthClientSecret.

At the Box Enterprise Developer Console:

  1. Log in to your Box developers dashboard.
  2. Click Create New App.
  3. Specify basic application information, as appropriate.
  4. Specify your application type (e.g., Custom App).
  5. Select the User Authentication (OAuth 2.0) authentication method.
  6. Set the Redirect URI:
    • If this is a desktop application or headless machine application, set the Redirect URI to http://localhost:33333 or a different port number.
  7. Click Create App.
  8. The next task is to create a public and private key pair.
    • To create a keypair from the Developer Console:
      1. Navigate to the Developer Console Configuration tab.
      2. Scroll down to Add and Manage Public Keys.
      3. Click Generate a Public/Private Keypair. Box creates a keypair in a JSON file, and downloads that file to your desktop. You can then move that file to your application code.

        Note: Box does not back up private keys for security reasons. Be careful to back up the Public/Private JSON file. If you lose your private key, you must reset the entire keypair.

    • To add a keypair manually:
      1. Open a terminal window and run the following OpenSSL commands:
        openssl genrsa -des3 -out private.pem 2048
        openssl rsa -in private.pem -outform PEM -pubout -out public.pem

        Note: To run OpenSSL in a Windows environment, install the Cygwin package.

      2. At the Developer Console, navigate to the configuration tab for the Custom OAuth application you just created.
      3. Scroll down to Add and Manage Public Keys.
      4. Click Add a Public Key.
      5. Click Verify and Save.
  9. Before the custom application can be used, a Box Admin must authorize it within the Box Admin Console.
    1. Navigate to your application within the Developer Console.
    2. Click the Authorization tab.
    3. At the prompt to Submit app for authorization for access to the Enterprise, click Review and Submit.
      Your Box Enterprise Admin approves the application.
  10. Finally, select the scope of user permissions your custom OAuth application must request.

After your application is created and registered, click Configuration from the main menu to access your settings. Note the displayed Redirect URI, Client ID, and Client Secret. You will need these values later.

When JWT Access Scopes Change

If you change the JWT access scopes, you must reauthorize the application in the enterprise admin console:

  1. Click Apps in the main manu.
  2. Select the ellipsis button next to your JWT application name.
  3. Select Reauthorize App in the menu.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060