|
| 1 | +Developer Keyrings - For Development Workflows |
| 2 | + |
| 3 | +While the previous pages focused on keyrings used to store user or organization credentials, DevRev also offers a special type called developer keyrings. These keyrings cater specifically to developers during the creation process. |
| 4 | + |
| 5 | +* Unlike other keyrings that store user credentials, developer keyrings are designed to hold sensitive information needed by the developer during development and execution of any particular task. |
| 6 | +* These secrets are provided by you, the developer, during the creation of a snap_in version. They are not exposed to users and are stored separately from the snap_in itself. |
| 7 | + |
| 8 | +**Types of Developer Keyrings:** |
| 9 | + |
| 10 | +* **snap_in_secret:** This is a simple way to store any plain text secret your snap_in requires. It's ideal for sensitive information that doesn't require complex formatting. |
| 11 | +* **oauth_secret:** This type of keyring is specifically designed to store OAuth client credentials securely. It allows you to define two separate fields: |
| 12 | + * client_id: The client ID provided by the OAuth provider. |
| 13 | + * client_secret: The client secret provided by the OAuth provider. |
| 14 | + |
| 15 | +Creating a Developer Keyring |
| 16 | + |
| 17 | +To create a developer keyring, follow these steps: |
| 18 | + |
| 19 | +1. creating a keyring type of snap_in_secret: |
| 20 | + * Using the UI: |
| 21 | + Navigate to the Snap-in page, click on the connection tab, and then find the snap_in_secret keyring type. |
| 22 | + * Using the CLI: |
| 23 | + Run the following command: |
| 24 | + ```bash |
| 25 | + echo \"[SECRET]\" | devrev developer_keyring create snap-in-secret <name of the keyring> |
| 26 | + ``` |
| 27 | +2. creating a keyring type of oauth_secret: |
| 28 | + * Using the CLI: |
| 29 | + Run the following command: |
| 30 | + ```bash |
| 31 | + echo '{"client_id":"[CLIENT_ID]","client_secret":"[CLIENT_SECRET]"}' | devrev developer_keyring create oauth-secret <NAME> |
| 32 | + ``` |
| 33 | +Once you've created the keyring, you can use it in your snap_in by referencing the keyring name in the snap_in manifest file. |
| 34 | +
|
| 35 | +**Declaring Developer Keyrings in the Snap-in Manifest:** |
| 36 | +
|
| 37 | +This section explains how to declare a developer keyring in your snap-in manifest. Developer keyrings provide a secure way to store sensitive information needed by your snap-in, such as OAuth client credentials. |
| 38 | +
|
| 39 | +Syntax: |
| 40 | +```yaml |
| 41 | + developer_keyrings: |
| 42 | + - name: <name of the keyring> |
| 43 | + description: <description of the keyring> |
| 44 | + display_name: <display name of the keyring> |
| 45 | +``` |
| 46 | +
|
| 47 | +When creating a new `snap_in_version` using the developer tools, you will be prompted to provide the values for the declared developer keyrings. This ensures that the sensitive information is securely stored and accessible to your snap-in at runtime. |
0 commit comments