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
Auth-Bridge is configured by ProxyPolicy CRD. Here's a basic configuration example:
40
-
41
-
```yaml
42
-
apiVersion: auth-bridge.dev/v1alpha1
43
-
kind: ProxyPolicy
44
-
metadata:
45
-
name: basic-auth
46
-
namespace: default
47
-
spec:
48
-
auth:
49
-
method: basicAuth
50
-
secret:
51
-
reference:
52
-
name: basic-auth
53
-
namespace: <secret namespace>
54
-
rules:
55
-
- name: basic-rule
56
-
validate: |
57
-
package proxy
58
-
59
-
default allow = true
60
-
---
61
-
apiVersion: v1
62
-
kind: Secret
63
-
metadata:
64
-
name: basic-auth
65
-
namespace: default
66
-
type: Opaque
67
-
stringData:
68
-
username: username
69
-
password: password
70
-
```
71
-
72
-
## Configuration
73
-
74
41
Auth-Bridge is configured by ProxyPolicy and Secret. Ensure that your ProxyPolicy and associated Secret are correctly configured based on your chosen authentication method and validation rules.
75
42
76
43
Here's a basic configuration example:
@@ -106,7 +73,7 @@ stringData:
106
73
password: password
107
74
```
108
75
109
-
### Field Definition
76
+
#### Field Definition
110
77
111
78
* `auth.method`
112
79
This field specifies the authentication method to be used. It can be set to either:
@@ -132,7 +99,7 @@ stringData:
132
99
}
133
100
```
134
101
135
-
### Advanced
102
+
#### Advanced
136
103
The OPA script also has access to an input object that contains information about the target request and the pod.
137
104
You can use input.<field> in your OPA script to make decisions. The available fields include:
138
105
@@ -158,7 +125,7 @@ In this example, the secret will only be injected if the request host is "exampl
158
125
## Usage
159
126
Using Auth-Bridge involves several key steps:
160
127
161
-
### Configure ProxyPolicy
128
+
#### Configure ProxyPolicy
162
129
Create a ProxyPolicy resource to define your proxy rules:
163
130
```yaml
164
131
apiVersion: auth-bridge.dev/v1alpha1
@@ -177,7 +144,7 @@ spec:
177
144
validate: <rule opa>
178
145
```
179
146
180
-
### Create Secret
147
+
#### Create Secret
181
148
182
149
Create a Secret with correct credentials based on your policy auth method:
183
150
@@ -193,7 +160,7 @@ stringData:
193
160
password: <password>
194
161
```
195
162
196
-
### Set proxy
163
+
#### Set proxy
197
164
To enable the Auth-Bridge proxy, set the following environment variables for your application:
0 commit comments