2.24.
2.24.1. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "config.istio.io/v1alpha2" kind: handler metadata: name: threescale spec: adapter: threescale params: system_url: "https://<organization>-admin.3scale.net/" access_token: "<ACCESS_TOKEN>" connection: address: "threescale-istio-adapter:3333"apiVersion: "config.istio.io/v1alpha2" kind: rule metadata: name: threescale spec: match: destination.labels["service-mesh.3scale.net"] == "true" actions: - handler: threescale.handler instances: - threescale-authorization.instance
2.24.1.1. 링크 복사링크가 클립보드에 복사되었습니다!
|
|
|
| |
|
|
|
| |
|
|
|
|
|
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2.24.1.1.1. 링크 복사링크가 클립보드에 복사되었습니다!
$ 3scale-config-gen --name=admin-credentials --url="https://<organization>-admin.3scale.net:443" --token="[redacted]"$ 3scale-config-gen --url="https://<organization>-admin.3scale.net" --name="my-unique-id" --service="123456789" --token="[redacted]"
2.24.1.2. 링크 복사링크가 클립보드에 복사되었습니다!
$ export NS="istio-system" URL="https://replaceme-admin.3scale.net:443" NAME="name" TOKEN="token" oc exec -n ${NS} $(oc get po -n ${NS} -o jsonpath='{.items[?(@.metadata.labels.app=="3scale-istio-adapter")].metadata.name}') \ -it -- ./3scale-config-gen \ --url ${URL} --name ${NAME} --token ${TOKEN} -n ${NS}- 참고
$ export CREDENTIALS_NAME="replace-me" export SERVICE_ID="replace-me" export DEPLOYMENT="replace-me" patch="$(oc get deployment "${DEPLOYMENT}" patch="$(oc get deployment "${DEPLOYMENT}" --template='{"spec":{"template":{"metadata":{"labels":{ {{ range $k,$v := .spec.template.metadata.labels }}"{{ $k }}":"{{ $v }}",{{ end }}"service-mesh.3scale.net/service-id":"'"${SERVICE_ID}"'","service-mesh.3scale.net/credentials":"'"${CREDENTIALS_NAME}"'"}}}}}' )" oc patch deployment "${DEPLOYMENT}" --patch ''"${patch}"''
2.24.1.3. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.2. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.3. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.4. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.4.1. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.4.1.1. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: threescale-authorization
namespace: istio-system
spec:
template: authorization
params:
subject:
user: request.query_params["user_key"] | request.headers["user-key"] | ""
action:
path: request.url_path
method: request.method | "get"
2.24.4.1.2. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: threescale-authorization
namespace: istio-system
spec:
template: authorization
params:
subject:
app_id: request.query_params["app_id"] | request.headers["app-id"] | ""
app_key: request.query_params["app_key"] | request.headers["app-key"] | ""
action:
path: request.url_path
method: request.method | "get"
2.24.4.1.3. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: threescale-authorization
spec:
template: threescale-authorization
params:
subject:
properties:
app_key: request.query_params["app_key"] | request.headers["app-key"] | ""
client_id: request.auth.claims["azp"] | ""
action:
path: request.url_path
method: request.method | "get"
service: destination.labels["service-mesh.3scale.net/service-id"] | ""
apiVersion: security.istio.io/v1beta1
kind: RequestAuthentication
metadata:
name: jwt-example
namespace: info
spec:
selector:
matchLabels:
app: productpage
jwtRules:
- issuer: >-
http://keycloak-keycloak.34.242.107.254.nip.io/auth/realms/3scale-keycloak
jwksUri: >-
http://keycloak-keycloak.34.242.107.254.nip.io/auth/realms/3scale-keycloak/protocol/openid-connect/certs
2.24.4.1.4. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: threescale-authorization
spec:
template: authorization
params:
subject:
user: request.query_params["user_key"] | request.headers["user-key"] |
properties:
app_id: request.query_params["app_id"] | request.headers["app-id"] | ""
app_key: request.query_params["app_key"] | request.headers["app-key"] | ""
client_id: request.auth.claims["azp"] | ""
action:
path: request.url_path
method: request.method | "get"
service: destination.labels["service-mesh.3scale.net/service-id"] | ""
2.24.5. 링크 복사링크가 클립보드에 복사되었습니다!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2.24.6. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.6.1. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.6.2. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.6.3. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.7. 링크 복사링크가 클립보드에 복사되었습니다!
2.24.8. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc get pods -n istio-system$ oc logs istio-system
2.24.9. 링크 복사링크가 클립보드에 복사되었습니다!