You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/docs/pages/references/keyrings/introduction.mdx
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,21 +10,22 @@ Here's where DevRev keyrings come in:
10
10
11
11
You can define keyrings within your snap-in manifest for each external service you need to connect to.
12
12
During installation, users will be prompted to provide their credentials for each keyring (think of it like securely logging in to each service through your snap-in). These credentials are then stored securely in the keyrings.
13
-
When your snap-in needs to interact with a specific service, it retrieves the necessary credentials from the corresponding keyring instead of your code. This keeps your sensitive information safe and isolated.
13
+
When your snap-in needs to interact with a specific service, it retrieves the necessary credentials from the corresponding keyring (see snap-in resources) instead of your code. This keeps your sensitive information safe and isolated.
14
14
15
15
Think of keyrings as secure vaults within your snap-in, acting as a middleman between your snap-in and the external services it connects to. This ensures both security and a smooth user experience during installation.
16
16
17
17
## Supported credential types
18
18
19
19
***OAuth:** Streamline connections with popular services like Slack and Jira using pre-defined OAuth keyrings.
20
-
***Secrets:** Store various secret configurations, including personal access tokens (PATs) and JSON web tokens (JWTs) for broader service integrations.
20
+
***Secrets:** Store various secret configurations, including personal access tokens (PATs) and Multi-field Token (JSON) for broader service integrations.
21
21
22
22
## Access levels
23
23
24
24
-**User level:** Securely store credentials specific to individual users, allowing them to connect their own accounts to external services through your snap-in.
25
25
-**Organization level:** Share credentials across your organization for access to a single, shared account for an external service.
26
26
27
27
## Syntax
28
+
A syntax for defining keyrings within your snap-in manifest:
Copy file name to clipboardExpand all lines: fern/docs/pages/references/keyrings/oauth_config.mdx
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
OAuth (Open Authorization) is a widely adopted standard for authorization that allows users to grant access to their accounts on one service (like Google or GitHub) to another application (like your DevRev snap-in) without needing to share their passwords directly. This approach enhances security and user convenience.
1
+
OAuth 2.0 (Open Authorization) is a widely adopted standard for authorization that allows users to grant access to their accounts on one service (like Google or GitHub) to another application (like your DevRev snap-in) without needing to share their passwords directly. This approach enhances security and user convenience.
2
2
3
3
For comprehensive information about the OAuth specification, refer to the official documentation: [OAuth 2.0](https://oauth.net/2/).
4
4
@@ -13,6 +13,12 @@ For comprehensive information about the OAuth specification, refer to the offici
13
13
4.**Access tokens:** Upon successful authorization, the service provides your snap-in with an access token. This token is used to access user data on the service's behalf without requiring the user's password again.
14
14
15
15
5.**Refreshing tokens:** A key benefit of using keyrings for OAuth is that they can handle refreshing access tokens automatically. Most OAuth implementations issue a refresh token alongside the access token. This refresh token can be used to obtain a new access token before the current one expires.
16
+
- if refresh_token is not provided, the user will need to re-authorize the connection after the access token expires.
17
+
- if refresh_token is expires, the user will need to re-authorize the connection after the access token expires.
18
+
19
+
6.**Revoking tokens:** For enhanced security, you can also configure your keyring to revoke access tokens when they are no longer needed. This ensures that even if a token is compromised, it can't be used to access user data.
20
+
21
+
7.**Organization data:** Optionally, you can configure your keyring to fetch additional information about the user's organization within the service. This can be useful for snap-ins that need to access organization-wide data.
16
22
17
23
### Keywords
18
24
@@ -45,6 +51,7 @@ keyring_types:
45
51
name: <keyring_type_name>
46
52
description: <keyring_type_description>
47
53
kind: "oauth2"
54
+
is_subdomain: <true/false> # optional: whether the keyring is a subdomain keyring or not. Default is false. It is used to get the subdomain from the user during creation.
48
55
scopes: # Scopes that the connection can request, add more scopes if needed for your use case. Each scope should have a name, description and value.
fields: # optional: data that the user shall provide in the input form when creating the connection. Each element represents one input field. Fields will be included in the final JSON secret. If omitted, the user will be asked for a generic secret.
111
-
- id: <field_id>
111
+
- id: <field_id_1>
112
112
name: <field_name>
113
113
description: <field_description>
114
-
- id: <field_id>
114
+
- id: <field_id_2>
115
115
name: <field_name>
116
116
description: <field_description>
117
117
token_verification: # The token_verification section is used to verify the token provided by the user.
@@ -122,7 +122,9 @@ keyring_types:
122
122
query_params:
123
123
<param_name>: <param_value> # optional: query parameters to be included in the verification request.
124
124
```
125
-
The secret_transform field is intended for more advanced scenarios where the secret needs to be transformed before use. For example, it could be used to hash a password before storing it within the keyring. The jq query provided in this field will be applied to the secret data before it is stored.
125
+
126
+
- The `secret_transform` field is intended for more advanced scenarios where the secret needs to be transformed before use. For example, it could be used to hash a password before storing it within the keyring. The jq query provided in this field will be applied to the secret data before it is stored.
127
+
- The `is_subdomain` field is optional and specifies whether the keyring contains a subdomain. Enabling this field allows the keyring to get the subdomain from the user during creation. This is useful when the keyring requires a subdomain as part of the configuration.
0 commit comments