Obtient la liste des règles d'authentification de la passerelle.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
mse:ListGatewayAuth |
get |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| PageNumber |
integer |
Non |
Le numéro de page. |
1 |
| PageSize |
integer |
Non |
Le nombre d'instances affichées par page. |
10 |
| OrderItem |
string |
Non |
Pas encore disponible pour utilisation. |
{} |
| DescSort |
boolean |
Non |
L'ordre de tri. |
false |
| FilterParams |
object |
Non |
Les conditions de filtrage. Reportez-vous à l'exemple. |
|
| Name |
string |
Non |
Le nom du paramètre. |
rutain-test |
| Type |
string |
Non |
Le type. |
JWT |
| Status |
boolean |
Non |
L'état d'activation. |
true |
| IsWhite |
boolean |
Non |
Le mode liste blanche. |
true |
| GatewayUniqueId |
string |
Non |
L'identifiant unique de la passerelle. |
gw-5017305290e14centbrveca**** |
| AcceptLanguage |
string |
Non |
La langue des résultats renvoyés. Valeurs valides : zh (par défaut) : chinois, en : anglais. |
zh |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Schéma de la réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
EC1EED4A-B147-597B-B949-FD3131AB4298 |
| HttpStatusCode |
integer |
Le code d'état HTTP. |
200 |
| Message |
string |
Le message d'erreur. |
La requête a été traitée avec succès |
| Code |
integer |
Le code d'état. La valeur 200 indique un succès. |
200 |
| Success |
boolean |
Le résultat de la requête. Valeurs valides : |
true |
| Data |
object |
Les données renvoyées. |
|
| TotalSize |
integer |
Le nombre total d'entrées. |
9 |
| PageNumber |
integer |
Le numéro de page. |
1 |
| PageSize |
integer |
Le nombre d'entrées par page. |
10 |
| Result |
array<object> |
Les résultats renvoyés. |
|
|
array<object> |
Les résultats renvoyés. |
||
| Id |
integer |
The authentication rule ID. |
549 |
| Name |
string |
The name of the authentication rule. |
test |
| GatewayUniqueId |
string |
The unique ID of the gateway. |
gw-e2d226bba4b2445c9e29fa7f8216**** |
| GatewayId |
integer |
The gateway ID. |
1 |
| Type |
string |
The authentication type. Valid values:
|
JWT |
| Issuer |
string |
Used when the authentication type is JWT or OIDC:
|
https://example.com/auth |
| Jwks |
string |
The JWT public key in JSON format. |
{\"keys\":[{\"kty\":\"oct\",\"k\":\"9V9lpiuAQsME1efQChI0kEQz6fdVlJbDRFFa1lvEB_A\",\"alg\":\"HS256\"}]} |
| TokenPosition |
string |
The JWT token type. Valid values:
The token parameter information to be verified. By default, the token is placed in the Authorization header with the Bearer prefix. Example: Authorization: Bearer token. |
HEADER |
| TokenName |
string |
The location where the JWT token is stored. The token parameter information to be verified. By default, the token is placed in the Authorization header with the Bearer prefix. Example: |
Authorization |
| TokenNamePrefix |
string |
The prefix of the JWT token. The token parameter information to be verified. By default, the token is placed in the Authorization header with the Bearer prefix. Example: |
Bearer |
| GmtCreate |
string |
The creation time. |
2021-09-13 19:24:23 |
| GmtModified |
string |
The modification time. |
2021-09-13 19:24:23 |
| TokenPass |
boolean |
Indicates whether the token is passed through. |
true |
| IsWhite |
boolean |
The authorization blacklists and whitelists pattern. Valid values:
|
true |
| Status |
boolean |
The enabled status. Valid values:
|
true |
| RedirectUrl |
string |
The redirect URL after successful authorization. Used for OIDC/IDaaS. This URL must be consistent with the redirect URL configured in OIDC/IDaaS. |
http://test.com/oauth2/callback |
| ClientId |
string |
The application ID registered with the service. Used for OIDC/IDaaS. |
app_mnvxaavggw7hcdcnr6usi6*** |
| ClientSecret |
string |
The application secret registered with the service. Used for OIDC/IDaaS. |
CS6EYfx3k9yTRR9EtQ2MXWP97P6UAUwFg4teoWJ19Z**** |
| CookieDomain |
string |
The cookie domain name. After authentication succeeds, the cookie is sent to the specified domain name to maintain the logon status. Used for OIDC/IDaaS. |
test.com |
| ScopesList |
string |
The OIDC authorization scopes. Used for OIDC. |
["openid"] |
| LoginUrl |
string |
The user logon page URL of the IDaaS instance. Used for IDaaS. |
https://daxxxxcn.aliyunidaas.com/ |
| Sub |
string |
Used when the authentication type is JWT. The sub (subject) in JWT claims, which indicates the subject. |
example-app |
| ExternalAuthZ |
object |
The custom authentication information. |
|
| ServiceId |
integer |
The authentication service ID. |
45186 |
| PrefixPath |
string |
The path of the authentication API provided by the authentication service. The API path uses prefix matching. |
/auth |
| TokenKey |
string |
The token location, which specifies the header in the request where the token is located. Common values include Authorization and Cookie. |
Authorization |
| AllowRequestHeaders |
array |
The allowed request header names. |
|
|
string |
The allowed request header names. |
x-req |
|
| AllowUpstreamHeaders |
array |
The allowed response header names. |
|
|
string |
The allowed response header names. |
x-resp |
|
| Timeout |
integer |
The timeout period of the authentication service. Unit: seconds. |
30 |
| WithRequestBody |
boolean |
Specifies whether to include the request body. |
true |
| WithRematchRoute |
boolean |
Specifies whether to rematch the route after authentication is complete. |
true |
| BodyMaxBytes |
integer |
The maximum number of bytes for the body. |
1024 |
| IsRestrict |
boolean |
The custom authentication mode. Valid values:
|
true |
| Service |
object |
The authentication service information. |
|
| Name |
string |
The authentication service name. |
updatetime |
| SourceType |
string |
The source type of the authentication service. |
MSE |
| GroupName |
string |
The service group name. |
com.mse.console.test.3YXO |
| Namespace |
string |
The namespace. |
default |
| AuthResourceMode |
integer |
The authorization resource mode. Valid values:
|
0 |
Exemples
JSON format
{
"RequestId": "EC1EED4A-B147-597B-B949-FD3131AB4298",
"HttpStatusCode": 200,
"Message": "The request was successfully processed.",
"Code": 200,
"Success": true,
"Data": {
"TotalSize": 9,
"PageNumber": 1,
"PageSize": 10,
"Result": [
{
"Id": 549,
"Name": "test",
"GatewayUniqueId": "gw-e2d226bba4b2445c9e29fa7f8216****",
"GatewayId": 1,
"Type": "JWT",
"Issuer": "https://example.com/auth",
"Jwks": "{\\\"keys\\\":[{\\\"kty\\\":\\\"oct\\\",\\\"k\\\":\\\"9V9lpiuAQsME1efQChI0kEQz6fdVlJbDRFFa1lvEB_A\\\",\\\"alg\\\":\\\"HS256\\\"}]}",
"TokenPosition": "HEADER",
"TokenName": "Authorization",
"TokenNamePrefix": "Bearer",
"GmtCreate": "2021-09-13 19:24:23",
"GmtModified": "2021-09-13 19:24:23",
"TokenPass": true,
"IsWhite": true,
"Status": true,
"RedirectUrl": "http://test.com/oauth2/callback",
"ClientId": "app_mnvxaavggw7hcdcnr6usi6***",
"ClientSecret": "CS6EYfx3k9yTRR9EtQ2MXWP97P6UAUwFg4teoWJ19Z****",
"CookieDomain": "test.com",
"ScopesList": "[\"openid\"]",
"LoginUrl": "\t\nhttps://daxxxxcn.aliyunidaas.com/",
"Sub": "example-app",
"ExternalAuthZ": {
"ServiceId": 45186,
"PrefixPath": "/auth",
"TokenKey": "Authorization",
"AllowRequestHeaders": [
"x-req"
],
"AllowUpstreamHeaders": [
"x-resp"
],
"Timeout": 30,
"WithRequestBody": true,
"WithRematchRoute": true,
"BodyMaxBytes": 1024,
"IsRestrict": true,
"Service": {
"Name": "updatetime",
"SourceType": "MSE",
"GroupName": "com.mse.console.test.3YXO",
"Namespace": "default"
}
},
"AuthResourceMode": 0
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.