Skip to content

Commit a7be676

Browse files
committed
doc updates for cmd specific auth
1 parent 47ee019 commit a7be676

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

website/docs/manifest-file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ the fields within the __`stackql_manifest.yml`__ file are described in further d
9999

100100
***
101101

102+
### <span className="docFieldHeading">`resource.auth`</span>
103+
104+
<ManifestFields.ResourceAuth />
105+
106+
***
107+
102108
### <span className="docFieldHeading">`resource.exports`</span>
103109

104110
<ManifestFields.ResourceExports />

website/docs/manifest_fields/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export { default as ResourceDescription } from './resources/description.mdx';
1313
export { default as ResourceExports } from './resources/exports.mdx';
1414
export { default as ResourceProps } from './resources/props.mdx';
1515
export { default as ResourceProtected } from './resources/protected.mdx';
16+
export { default as ResourceAuth } from './resources/auth.mdx';
1617
export { default as ResourcePropName } from './resources/props/name.mdx';
1718
export { default as ResourcePropDescription } from './resources/props/description.mdx';
1819
export { default as ResourcePropValue } from './resources/props/value.mdx';
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import File from '@site/src/components/File';
2+
import LeftAlignedTable from '@site/src/components/LeftAlignedTable';
3+
4+
## Custom Authentication at Resource Level
5+
6+
This feature allows for custom authentication settings to be specified at the resource level within the `stackql_manifest.yml` file. This enables context-specific authentication configurations, such as control plane or data plane context switching within the same stack. Authentication parameters can be overridden by setting specific variable references in the `auth` section.
7+
8+
<LeftAlignedTable type="object" required={false} />
9+
10+
The `auth` object will depend upon the provider the resource belongs to, consult the provider documentation in the [StackQL Provider Registry Docs](https://stackql.io/registry).
11+
12+
### Example Usage
13+
14+
<File name='stackql_manifest.yml'>
15+
16+
```yaml {4,12-18}
17+
resources:
18+
- name: app_manager_api_key
19+
props:
20+
- name: display_name
21+
value: "{{ stack_name }}-{{ stack_env }}-app-manager-api-key"
22+
- name: description
23+
value: "Kafka API Key owned by 'app-manager' service account"
24+
- name: owner
25+
value:
26+
id: app_manager_id
27+
api_version: app_manager_api_version
28+
kind: app_manager_kind
29+
exports:
30+
- app_manager_api_key_id
31+
- app_manager_api_key_secret
32+
33+
- name: users_topic
34+
auth:
35+
confluent:
36+
type: basic
37+
username_var: app_manager_api_key_id
38+
password_var: app_manager_api_key_secret
39+
props:
40+
- name: topic_name
41+
value: "users"
42+
- name: kafka_cluster
43+
value: {{ cluster_id }}
44+
- name: rest_endpoint
45+
value: {{ cluster_rest_endpoint }}
46+
```
47+
48+
This configuration sets up a custom `basic` authentication for the `users_topic` resource, where:
49+
50+
- `username_var` is set to `app_manager_api_key_id`
51+
- `password_var` is set to `app_manager_api_key_secret`
52+
53+
These variables are defined in the exported section of the `app_manager_api_key` resource and dynamically referenced within the authentication configuration.

0 commit comments

Comments
 (0)