08 apig
Let's look at the effect first, and then complete the configuration step by step.
Configurate APIG + CCE workloads
Create the APIG step by step like this:
click Gateway Information--> Basic Information --> Routes
, Edit and add the container CIDR.
import CCE workload
The backend configuration of APIG must be consistent with that of CCE workload.
If we want to access the publish APIG through the public network, this is need bind Inbond Access
EIP.
If need CCE workload access the outside, this is need open the outbound access permission.
APIG policy
You can select the corresponding plug-in to implement different functions. for example: Rate limit, IP block
configurate authenticate
create a function and integrate with APIG
the python demo code like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Follow this procedure to create API Policies --> Custom Authorizers
let's debug the apis, if didn use authorize, you will recive this response:
1 2 3 4 5 6 7 8 9 10 |
|
Add the authorzation header and requeste again
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))