authentication - 使用带有 Kerberos 的 cURL 在 Keycloak 上进行身份验证

标签 authentication curl kerberos keycloak openid-connect

我有以下设置:

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

  • 据我所知,将 cURL 与 Kerberos 身份验证一起使用,它看起来类似于:
    $ curl --negotiate -u : https://app.example.com/index.html
    

    可以使用资源所有者密码凭据授予类型以非交互方式获取访问 token 。但是我如何使用 cURL 获得它带有 Kerberos 票证 和 key 斗篷?

    最佳答案

    官方文档中有一个例子[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"
    
  • [1] https://www.keycloak.org/docs/latest/securing_apps/index.html#_resource_owner_password_credentials_flow
  • [2] https://www.keycloak.org/docs/latest/server_admin/index.html#troubleshooting-2
  • 关于authentication - 使用带有 Kerberos 的 cURL 在 Keycloak 上进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57623773/

    相关文章:

    java - 如何通过 OSGI 包中的 kerberos 与 hdfs 连接

    c# - 使用 Azure Active Directory 进行身份验证时进行 Azure 管理库 API 调用时出错

    c - 链接curl时exe非常大

    c# - 从事件目录中检索组下的用户列表时出错(C# 中的 System.DirectoryServices.AccountManagement)

    json - 如何通过调用 Invoke-WebRequest 访问 JSON?

    java - WSO2 DSS 错误 : javax. xml.stream.XMLStreamException:无效的凝视元素

    linux - 使用 MIT Kerberos 作为 Windows AD 域的帐户域

    ruby - Ruby/Rack 中的单点登录服务器身份验证

    java - 登录后设置 session 属性

    winapi - 在登录屏幕上将密码发送到远程计算机 [Windows 7]