-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
authN-authZ: change folder and split support
* change the folder to a upper level directory * split the support for helm chart and gmc-based deployment Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
- Loading branch information
Showing
31 changed files
with
195 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: security.istio.io/v1 | ||
kind: RequestAuthentication | ||
metadata: | ||
name: fake-jwt-example | ||
spec: | ||
jwtRules: | ||
- issuer: testing@secure.istio.io | ||
jwksUri: https://raw.githubusercontent.com/istio/istio/release-1.22/security/tools/jwt/samples/jwks.json | ||
selector: | ||
matchLabels: | ||
app: chatqna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: security.istio.io/v1 | ||
kind: RequestAuthentication | ||
metadata: | ||
name: jwt-keycloak | ||
spec: | ||
jwtRules: | ||
- issuer: http://${KEYCLOAK_ADDR}/realms/${REALM} | ||
jwksUri: http://${KEYCLOAK_ADDR}/realms/${REALM}/protocol/openid-connect/certs | ||
outputPayloadToHeader: jwt-parsed | ||
selector: | ||
matchLabels: | ||
app: chatqna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: security.istio.io/v1 | ||
kind: AuthorizationPolicy | ||
metadata: | ||
name: fake-jwt-example | ||
spec: | ||
action: ALLOW | ||
rules: | ||
- from: | ||
- source: | ||
requestPrincipals: | ||
- testing@secure.istio.io/testing@secure.istio.io | ||
when: | ||
- key: request.auth.claims[groups] | ||
values: | ||
- group1 | ||
selector: | ||
matchLabels: | ||
app: chatqna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: security.istio.io/v1 | ||
kind: AuthorizationPolicy | ||
metadata: | ||
name: router | ||
spec: | ||
action: ALLOW | ||
rules: | ||
- when: | ||
- key: request.auth.claims[iss] | ||
values: | ||
- 'http://${KEYCLOAK_ADDR}/realms/istio' | ||
- key: request.auth.claims[preferred_username] | ||
values: | ||
- 'mary' | ||
- key: request.auth.claims[realm_access][roles] | ||
values: | ||
- 'user' | ||
selector: | ||
matchLabels: | ||
app: chatqna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: networking.istio.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: router-gateway | ||
spec: | ||
selector: | ||
istio: ingressgateway | ||
servers: | ||
- hosts: | ||
- '*' | ||
port: | ||
name: http | ||
number: 80 | ||
protocol: HTTP | ||
--- | ||
apiVersion: networking.istio.io/v1 | ||
kind: VirtualService | ||
metadata: | ||
name: chatqna-router | ||
namespace: chatqa | ||
spec: | ||
gateways: | ||
- default/router-gateway | ||
hosts: | ||
- '*' | ||
http: | ||
- route: | ||
- destination: | ||
host: chatqna | ||
port: | ||
number: 8888 |
39 changes: 39 additions & 0 deletions
39
authN-authZ/helm-chart-based/chatQnA_router_gateway_oauth.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
apiVersion: networking.istio.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: chatqna-gateway | ||
namespace: istio-system | ||
spec: | ||
selector: | ||
istio: ingressgateway | ||
servers: | ||
- hosts: | ||
- chatqna-service.com | ||
port: | ||
name: http | ||
number: 80 | ||
protocol: HTTP | ||
--- | ||
apiVersion: networking.istio.io/v1 | ||
kind: VirtualService | ||
metadata: | ||
name: chatqna-virtual-service | ||
namespace: istio-system | ||
spec: | ||
gateways: | ||
- istio-system/chatqna-gateway | ||
hosts: | ||
- chatqna-service.com | ||
http: | ||
- match: | ||
- uri: | ||
prefix: / | ||
route: | ||
- destination: | ||
host: chatqna.chatqa.svc.cluster.local | ||
port: | ||
number: 8888 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters