Skip to content

Commit

Permalink
Fix oauth2 settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed Jun 19, 2024
1 parent 65d19c6 commit 12b76c2
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
10 changes: 4 additions & 6 deletions .ci/tests/integration-oauth2/cases/batch-source/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ spec:
certSecretKey: ""
authConfig:
oauth2Config:
audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0
scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
audience: urn:sn:pulsar:sndev:test
issuerUrl: https://auth.sncloud-stg.dev/
keySecretName: sn-platform-oauth2-private-key
keySecretKey: auth.json
cleanupAuthConfig:
oauth2Config:
audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0
scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
audience: urn:sn:pulsar:sndev:test
issuerUrl: https://auth.sncloud-stg.dev/
keySecretName: sn-platform-oauth2-private-key
keySecretKey: auth.json
image: streamnative/pulsar-io-batch-data-generator:3.2.2.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
certSecretKey: ""
authConfig:
genericAuth:
clientAuthenticationParameters: '{"audience":"api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default","issuerUrl":"https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0","privateKey":"/mnt/secrets/auth.json","type":"client_credentials","scope":"api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default","issuer_url":"https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0","private_key":"/mnt/secrets/auth.json"}'
clientAuthenticationParameters: '{"audience":"urn:sn:pulsar:sndev:test","issuerUrl":"https://auth.sncloud-stg.dev/","privateKey":"/mnt/secrets/auth.json","type":"client_credentials","issuer_url":"https://auth.sncloud-stg.dev/","private_key":"/mnt/secrets/auth.json"}'
clientAuthenticationPlugin: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
java:
jar: pulsar-functions-api-examples.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ spec:
certSecretKey: ""
authConfig:
oauth2Config:
audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0
scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
audience: urn:sn:pulsar:sndev:test
issuerUrl: https://auth.sncloud-stg.dev/
keySecretName: sn-platform-oauth2-private-key
keySecretKey: auth.json
java:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ spec:
certSecretKey: ""
authConfig:
oauth2Config:
audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0
scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
audience: urn:sn:pulsar:sndev:test
issuerUrl: https://auth.sncloud-stg.dev/
keySecretName: sn-platform-oauth2-private-key
keySecretKey: auth.json
java:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ spec:
hostnameVerification: true
authConfig:
oauth2Config:
audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0
scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
audience: urn:sn:pulsar:sndev:test
issuerUrl: https://auth.sncloud-stg.dev/
keySecretName: sn-platform-oauth2-private-key
keySecretKey: auth.json
python:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ data:
---
apiVersion: v1
data:
clientAuthenticationParameters: eyJhdWRpZW5jZSI6ImFwaTovLzU2YzFiZDE0LTNiYTctNDgwNC1iNDdiLWQ0NmRlNmRjZTMzZS8uZGVmYXVsdCIsImlzc3VlclVybCI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzA2YThhMDg2LWFlNmUtNDViNS1hMjJlLWFkOTBkZTIzMDEzZS92Mi4wIiwicHJpdmF0ZUtleSI6Ii9tbnQvc2VjcmV0cy9hdXRoLmpzb24iLCJ0eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOiJhcGk6Ly81NmMxYmQxNC0zYmE3LTQ4MDQtYjQ3Yi1kNDZkZTZkY2UzM2UvLmRlZmF1bHQiLCJpc3N1ZXJfdXJsIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMDZhOGEwODYtYWU2ZS00NWI1LWEyMmUtYWQ5MGRlMjMwMTNlL3YyLjAiLCJwcml2YXRlX2tleSI6Ii9tbnQvc2VjcmV0cy9hdXRoLmpzb24ifQo=
clientAuthenticationParameters: eyJhdWRpZW5jZSI6InVybjpzbjpwdWxzYXI6c25kZXY6dGVzdCIsImlzc3VlclVybCI6Imh0dHBzOi8vYXV0aC5zbmNsb3VkLXN0Zy5kZXYvIiwicHJpdmF0ZUtleSI6Ii9tbnQvc2VjcmV0cy9hdXRoLmpzb24iLCJ0eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwiaXNzdWVyX3VybCI6Imh0dHBzOi8vYXV0aC5zbmNsb3VkLXN0Zy5kZXYvIiwicHJpdmF0ZV9rZXkiOiIvbW50L3NlY3JldHMvYXV0aC5qc29uIn0=
clientAuthenticationPlugin: b3JnLmFwYWNoZS5wdWxzYXIuY2xpZW50LmltcGwuYXV0aC5vYXV0aDIuQXV0aGVudGljYXRpb25PQXV0aDI=
kind: Secret
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ spec:
hostnameVerification: true
authConfig:
oauth2Config:
audience: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
issuerUrl: https://sts.windows.net/06a8a086-ae6e-45b5-a22e-ad90de23013e/v2.0
scope: api://56c1bd14-3ba7-4804-b47b-d46de6dce33e/.default
audience: urn:sn:pulsar:sndev:test
issuerUrl: https://auth.sncloud-stg.dev/
keySecretName: sn-platform-oauth2-private-key
keySecretKey: auth.json
python:
Expand Down
4 changes: 2 additions & 2 deletions .ci/tests/integration-oauth2/e2e_with_downloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ setup:

- name: Update values file
command: |
sed -i "s/CLIENT_SECRET/${OAUTH_CLIENT_SECRET}/g" .ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml
sed -i "s/CLIENT_ID/${OAUTH_CLIENT_ID}/g" .ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml
sed -i "s/CLIENT_SECRET/${AZURE_CLIENT_SECRET}/g" .ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml
sed -i "s/CLIENT_ID/${AZURE_CLIENT_ID}/g" .ci/clusters/values_skywalking_e2e_cluster_with_oauth.yaml
- name: install pulsar cluster
command: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test-integration-skywalking-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ on:
- 'LICENSE'
- 'mesh-worker-service/README.md'
- 'tools/README.md'

# cancel old workflow if new one is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: read-all
jobs:
integration:
runs-on: ubuntu-latest
env:
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
timeout-minutes: 80
strategy:
matrix:
Expand Down

0 comments on commit 12b76c2

Please sign in to comment.