mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 14:52:16 +08:00
Add jwtTokenAuth to plugin metadata schema (#30346)
This commit is contained in:
@ -171,15 +171,40 @@ For data source plugins. Proxy routes used for plugin authentication and adding
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Property | Type | Required | Description |
|
| Property | Type | Required | Description |
|
||||||
|---------------|----------------------|----------|---------------------------------------------------------------------------------------------------------|
|
|----------------|-------------------------|----------|---------------------------------------------------------------------------------------------------------|
|
||||||
| `headers` | array | No | For data source plugins. Route headers adds HTTP headers to the proxied request. |
|
| `headers` | array | No | For data source plugins. Route headers adds HTTP headers to the proxied request. |
|
||||||
| `method` | string | No | For data source plugins. Route method matches the HTTP verb like GET or POST. |
|
| `jwtTokenAuth` | [object](#jwttokenauth) | No | For data source plugins. Token authentication section used with an JWT OAuth API. |
|
||||||
| `path` | string | No | For data source plugins. The route path that is replaced by the route URL field when proxying the call. |
|
| `method` | string | No | For data source plugins. Route method matches the HTTP verb like GET or POST. |
|
||||||
| `reqRole` | string | No | |
|
| `path` | string | No | For data source plugins. The route path that is replaced by the route URL field when proxying the call. |
|
||||||
| `reqSignedIn` | boolean | No | |
|
| `reqRole` | string | No | |
|
||||||
| `tokenAuth` | [object](#tokenauth) | No | For data source plugins. Token authentication section used with an OAuth API. |
|
| `reqSignedIn` | boolean | No | |
|
||||||
| `url` | string | No | For data source plugins. Route URL is where the request is proxied to. |
|
| `tokenAuth` | [object](#tokenauth) | No | For data source plugins. Token authentication section used with an OAuth API. |
|
||||||
|
| `url` | string | No | For data source plugins. Route URL is where the request is proxied to. |
|
||||||
|
|
||||||
|
### jwtTokenAuth
|
||||||
|
|
||||||
|
For data source plugins. Token authentication section used with an JWT OAuth API.
|
||||||
|
|
||||||
|
#### Properties
|
||||||
|
|
||||||
|
| Property | Type | Required | Description |
|
||||||
|
|----------|-------------------|----------|---------------------------------------------------------------------------|
|
||||||
|
| `params` | [object](#params) | No | For data source plugins. Parameters for the token authentication request. |
|
||||||
|
| `url` | string | No | For data source plugins. URL to fetch the JWT token. |
|
||||||
|
|
||||||
|
#### params
|
||||||
|
|
||||||
|
For data source plugins. Parameters for the token authentication request.
|
||||||
|
|
||||||
|
##### Properties
|
||||||
|
|
||||||
|
| Property | Type | Required | Description |
|
||||||
|
|-----------------|--------|----------|--------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `client_id` | string | No | For data source plugins. OAuth client id. |
|
||||||
|
| `client_secret` | string | No | For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
|
||||||
|
| `grant_type` | string | No | For data source plugins. OAuth grant type. |
|
||||||
|
| `resource` | string | No | For data source plugins. OAuth resource. |
|
||||||
|
|
||||||
### tokenAuth
|
### tokenAuth
|
||||||
|
|
||||||
|
@ -380,6 +380,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"jwtTokenAuth": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "For data source plugins. Token authentication section used with an JWT OAuth API.",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "For data source plugins. URL to fetch the JWT token.",
|
||||||
|
"format": "uri"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "For data source plugins. Parameters for the token authentication request.",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"grant_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "For data source plugins. OAuth grant type."
|
||||||
|
},
|
||||||
|
"client_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "For data source plugins. OAuth client id."
|
||||||
|
},
|
||||||
|
"client_secret": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
|
||||||
|
},
|
||||||
|
"resource": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "For data source plugins. OAuth resource."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user