-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from ramgrandhi/feat/support-for-oauth-and-mtls
Aded support for oauth and mtls.
- Loading branch information
Showing
6 changed files
with
124 additions
and
9 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
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
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
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
18 changes: 18 additions & 0 deletions
18
src/__tests__/e2e/valid-mtls-enabled-and-oauth-enabled-3.2.0/cert.cer
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,18 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIC1TCCAb2gAwIBAgIJAOnghp4UWa/lMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV | ||
BAMTD3d3dy5leGFtcGxlLmNvbTAeFw0yMTA0MTExNDIwNDlaFw0zMTA0MDkxNDIw | ||
NDlaMBoxGDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEB | ||
BQADggEPADCCAQoCggEBAKm/cmcYhWOL4jn+1Y/eHLnF6dbNzzuxByF5I4Ei0Aa2 | ||
vRnmmCFJLb9MI03Dj4H99RK7WEvx8g7YF4WqAZc3n9ztPrHu1sGnMGsnaPPpvCdl | ||
BLo2AD6ZQ07K5O6jsKLIno/qQi4dUXvfQ5io11xeRbUTROQiTgOsVoWSYeIyeJmY | ||
hmg4owtnoIBvZfWyXKrqy1nb8yNggDP8C35bUFXtOavdTCPrREe58l89wJggmukT | ||
QqHFPmB7rpwOyJI9dSVavC8v/WbV/LbaS3auaTkUCHkQL5NIKZNyXOxbReDyJ0jS | ||
7eMk2ZEQB+87HCfLORyB/zbj5jG6ftRu4TsVm/A8Ak0CAwEAAaMeMBwwGgYDVR0R | ||
BBMwEYIPd3d3LmV4YW1wbGUuY29tMA0GCSqGSIb3DQEBBQUAA4IBAQB7NbyoQCaL | ||
ijan0pyDRW3joDj2xXVEnHSEd8jeKdURY4ADIcb3+CFZ78IA+KHoG3m7yVAdebCw | ||
HA3yRoZXgWc2fG92xMIJsOabF19k6grnaAkJR+/Zzh0CuXZWvkLETKjqZ7opx0jB | ||
hW8ZnSxtaM/91rmW6gNOcnmLknBD2oiDjo1s9Ntax8UQtWgXgEWEE9tC4DeRUx4t | ||
3RqmliCqWMLFb67mkWnsXYzbavHESVx2KmTzcnw4Q3xE2VyVvl5i1l34Tv2/QoPu | ||
ntq9V6GqFmJbxPfWydIXYr7leCCnX9r65MSN3sDtV+/I7JUegR4z6UgeF1z7kuVo | ||
GFKdTX4n4OyD | ||
-----END CERTIFICATE----- |
91 changes: 91 additions & 0 deletions
91
src/__tests__/e2e/valid-mtls-enabled-and-oauth-enabled-3.2.0/serverless.yml
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,91 @@ | ||
service: serverless-wso2-apim | ||
provider: | ||
name: aws | ||
stackName: ${env:STACK_NAME} | ||
deploymentBucket: | ||
name: ${env:TEST_ID_NORMALIZED} | ||
plugins: | ||
- serverless-localstack | ||
- serverless-deployment-bucket | ||
- "../../../../../src" | ||
|
||
#⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇ Modify the configuration below to suit your test case. | ||
#⬇⬇⬇ START HERE ⬇⬇⬇⬇ Help: https://github.com/ramgrandhi/serverless-wso2-apim#configuration-reference | ||
#⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇⬇ For a full list of env vars that you can use, refer `src/__tests__/e2e/e2e.test.js` | ||
custom: | ||
wso2apim: | ||
enabled: true | ||
host: ${env:WSO2_HOST} | ||
port: ${env:WSO2_PORT} | ||
user: ${env:WSO2_USER} | ||
pass: ${env:WSO2_PASS} | ||
gatewayEnv: ${env:WSO2_ENV} | ||
apidefs: | ||
- name: ${env:TEST_ID}-1 | ||
description: ${env:TEST_ID}-1 | ||
rootContext: /${env:TEST_ID}-1 | ||
version: "v1" | ||
visibility: "PRIVATE" | ||
securityScheme: | ||
mutualssl: | ||
enabled: true | ||
clientCert: 'file://cert.cer' | ||
oauth2: | ||
enabled: true | ||
mandatory: true | ||
keyManager: | ||
- 'Resident Key Manager' | ||
backend: | ||
http: | ||
baseUrl: "https://baseUrl" | ||
maxTps: 10 | ||
tags: | ||
- ${env:TEST_ID}-1 | ||
swaggerSpec: | ||
swagger: "2.0" | ||
info: | ||
title: ${env:TEST_ID}-1 | ||
version: "v1" | ||
contact: | ||
name: ${env:TEST_ID}-1 | ||
email: ${env:TEST_ID}-1 | ||
paths: | ||
/*: | ||
post: | ||
responses: | ||
"201": | ||
description: Created | ||
x-auth-type: "None" | ||
# - name: ${env:TEST_ID}-2 | ||
# description: ${env:TEST_ID}-2 | ||
# rootContext: /${env:TEST_ID}-2 | ||
# version: "1" | ||
# visibility: "PUBLIC" | ||
# backend: | ||
# http: | ||
# baseUrl: "https://baseUrl" | ||
# maxTps: 10 | ||
# tags: | ||
# - ${env:TEST_ID}-2 | ||
# swaggerSpec: | ||
# openapi: 3.0.0 | ||
# info: | ||
# title: ${env:TEST_ID}-2 | ||
# version: "1" | ||
# contact: | ||
# name: ${env:TEST_ID}-2 | ||
# email: ${env:TEST_ID}-2 | ||
# paths: | ||
# /*: | ||
# post: | ||
# responses: | ||
# "201": | ||
# description: Created | ||
# x-auth-type: "None" | ||
|
||
# Optionally, add your other AWS provider-specific resources below. | ||
# Make sure there is at least one resource listed below, otherwise stack deployment would fail. | ||
resources: | ||
Resources: | ||
Topic: | ||
Type: AWS::SNS::Topic |