当使用kcadm.sh get authentication/flows -r master读取身份验证流时,我得到了内置流的结果。
{
"id" : "cee86f07-db10-4e84-9a5e-a9c6ae1c3703",
"alias" : "http challenge",
"description" : "An authentication flow based on challenge-response HTTP Authentication Schemes",
"providerId" : "basic-flow",
"topLevel" : true,
"builtIn" : true,
"authenticationExecutions" : [ {
"authenticator" : "no-cookie-redirect",
"authenticatorFlow" : false, <---
"autheticatorFlow" : false, <---
"requirement" : "REQUIRED",
"priority" : 10,
"userSetupAllowed" : false
}, {
"authenticatorFlow" : true,
"requirement" : "REQUIRED",
"priority" : 20,
"autheticatorFlow" : true,
"flowAlias" : "Authentication Options",
"userSetupAllowed" : false
} ]
}这个字段在REST文档中没有提到。这是否有更深层次的含义,或者这只是一些为兼容性而保留的遗留错误(比如HTTP引用程序与HTTP引用程序)?在通过REST创建新流时,是否必须设置这个无文档的字段?
发布于 2022-07-22 03:09:13
短篇小说:使用"authenticatorFlow“
这似乎是一个长期存在的拼写错误。如果深入研究keycloak源代码,例如,这里的v15.1.1:https://github.com/keycloak/keycloak/blob/15.1.1/core/src/main/java/org/keycloak/representations/idm/AbstractAuthenticationExecutionRepresentation.java#L71,您将看到拼写错误的"autheticatorFlow“被标记为弃用。
@Deprecated
public void setAutheticatorFlow(boolean autheticatorFlow) {
this.authenticatorFlow = autheticatorFlow;
}
...snip...
public void setAuthenticatorFlow(boolean authenticatorFlow) {
this.authenticatorFlow = authenticatorFlow;
}在源的其他部分,您将看到拼写正确的属性"authenticatorFlow“的setter,例如:https://github.com/keycloak/keycloak/blob/15.1.1/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java#L1649 (它显示拼写错误的是db列)。
model.setAuthenticatorFlow(entity.isAutheticatorFlow());使用拼写正确的"authenticatorFlow“应该是安全的。但是,始终要对特定版本进行评估。
https://stackoverflow.com/questions/71999288
复制相似问题