将cURL与Kerberos一起使用以对Keycloak进行身份验证

时间:2019-08-23 09:50:46

标签: authentication curl kerberos keycloak openid-connect

我给出了以下设置:

  • 位于https://auth.example.com的keycloak服务器
  • 具有LDAP提供程序配置的AD连接​​
  • 在LDAP提供程序配置中设置的Kerberos选项
  • 与任何AD用户进行身份验证
  • 使用Kerberos票证进行身份验证在浏览器中有效

我知道将cURL与Kerberos身份验证一起使用,它看起来类似于:

$ curl --negotiate -u : https://app.example.com/index.html

可以使用“资源所有者密码凭据授予类型”以非交互方式获取访问令牌。但是如何使用带有Kerberos票证的cURL 和Keycloak来获得它?

1 个答案:

答案 0 :(得分:0)

官方文档中有一个示例[1]:

curl \
  -d "client_id=myclient" \
  -d "client_secret=40cc097b-2a57-4c17-b36a-8fdf3fc2d578" \
  -d "username=user" \
  -d "password=password" \
  -d "grant_type=password" \
  "http://localhost:8080/auth/realms/master/protocol/openid-connect/token"