使用 cURL 和 Kerberos 在 Keycloak 上进行身份验证

x4k*_*k3p 6 authentication curl kerberos openid-connect keycloak

我给出了以下设置:

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

据我所知,将 cURL 与 Kerberos 身份验证结合使用,它看起来与此类似:

$ curl --negotiate -u : https://app.example.com/index.html
Run Code Online (Sandbox Code Playgroud)

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

Joe*_*Joe 1

官方文档中有一个例子[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"
Run Code Online (Sandbox Code Playgroud)

  • 我知道这一点,我更新了问题。我想使用 kerberos 票证而不是 ROPC (4认同)