Product-apim: Micro GW๋ฅผ ์ง€์›ํ•˜๋„๋ก OAS ์ •์˜ ๊ฐœ์„ 

์— ๋งŒ๋“  2019๋…„ 10์›” 07์ผ  ยท  11์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: wso2/product-apim

ํ˜„์žฌ ๋‹ค์Œ ์‚ฌ์šฉ์ž ์ •์˜ ์†์„ฑ์€ OAS ์ •์˜์—์„œ ์ง€์›๋ฉ๋‹ˆ๋‹ค. ๊ฒ€ํ† ํ•˜๊ณ  ๊ฐœ์„ ํ•  ์‚ฌํ•ญ์ด ์žˆ์œผ๋ฉด ์ œ์•ˆํ•˜์‹ญ์‹œ์˜ค.

x-wso2-auth-header: "Authorization"
x-throttling-tier: "Unlimited"
x-wso2-cors:
corsConfigurationEnabled: false
accessControlAllowOrigins:
- "*"
accessControlAllowCredentials: false
accessControlAllowHeaders:
- "authorization"
- "Access-Control-Allow-Origin"
- "Content-Type"
- "SOAPAction"
accessControlAllowMethods:
- "GET"
- "PUT"
- "POST"
- "DELETE"
- "PATCH"
- "OPTIONS"
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-basePath: "/sample/1.0.0"
x-wso2-transports:
- "http"
- "https"

๊ฐ ์—”๋“œํฌ์ธํŠธ ์œ ํ˜•์— ๋Œ€ํ•œ ๊ตฌ์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

HTTP
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"

HTTP ์žฅ์•  ์กฐ์น˜
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"

HTTP ๋ถ€ํ•˜ ๋ถ„์‚ฐ
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "load_balance"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "load_balance"

๋น„๋ˆ„
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"

SOAP ์žฅ์•  ์กฐ์น˜
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "failover"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "failover"

SOAP ๋ถ€ํ•˜ ๋ถ„์‚ฐ
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "load_balance"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "load_balance"

๊ธฐ๋ณธ ์—”๋“œํฌ์ธํŠธ
x-wso2-production-endpoints:
endpoint_type: "default"
x-wso2-sandbox-endpoints:
endpoint_type: "default"

๋ชจ๋“  11 ๋Œ“๊ธ€

์šฐ๋ฆฌ๊ฐ€ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์„๊นŒ์š”?
endpoint_type: "http" -> ์œ ํ˜•: "http"

๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•œ ๋ณด์•ˆ์„ ๋น„ํ™œ์„ฑํ™”ํ•˜๋ ค๋ฉด x-wso2-disable-security ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. https://github.com/wso2/product-microgateway#microgateway -supported-open-api-extensions

๋ณ€ํ™”๊ฐ€ ํ•„์š”ํ•˜๋‹ค
URL -> URL

x-throttling-tier: "๋ฌด์ œํ•œ"
x-wso2-throttling-tier์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋‹จ์ผ ๋์ ์ด๋“  ์•„๋‹ˆ๋“  ๊ทธ๊ฒƒ์€ ๋ฐฐ์—ด์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
url: "https://localhost:9443/publisher/apis/create/rest" ->
URL:

HTTP failover
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"

๋กœ ๋ณ€๊ฒฝํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค

HTTP failover
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
type: "failover"

๋กœ๋“œ ๋ฐธ๋Ÿฐ์‹ฑ ์—”๋“œํฌ์ธํŠธ๋„ ๋งˆ์ฐฌ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค.

๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•œ ๋ณด์•ˆ์„ ๋น„ํ™œ์„ฑํ™”ํ•˜๋ ค๋ฉด x-wso2-disable-security ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. https://github.com/wso2/product-microgateway#microgateway -supported-open-api-extensions

@praminda ์ด ์ •๋ณด๋Š” ์ด๋ฏธ 'x-auth-type'์ด๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์žˆ์Šต๋‹ˆ๋‹ค. ์žฌ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‚˜์š”?

x-throttling-tier: "๋ฌด์ œํ•œ"
x-wso2-throttling-tier์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

@hasuniea ์ด ์ •๋ณด๋Š” ์ด๋ฏธ 'x-throttling-tier'๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์žˆ์Šต๋‹ˆ๋‹ค. ์†Œ์†ก์„ ์ œ๊ธฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ? ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์Šค์›จ๊ฑฐ์— ์ค‘๋ณต ์ •๋ณด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

x-์กฐ์ ˆ ๊ณ„์ธต

ํ˜„์žฌ ๋งˆ์ดํฌ๋กœ ๊ฒŒ์ดํŠธ์›จ์ด๋Š” x-throttling-tier๋ฅผ ์ง€์›ํ•˜๋ฏ€๋กœ ๋ฐ์ดํ„ฐ ์ค‘๋ณต์ด๋ฏ€๋กœ ๊ทธ๋Œ€๋กœ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค.

x ์ธ์ฆ ์œ ํ˜•

์˜ˆ, MGW์—์„œ ์ง€์›ํ•˜๋ฏ€๋กœ ์ด ํ™•์žฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ๋ฌธ์ œ๋Š” ์ˆ˜์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ์‡„.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰