iPhone上的Kerberos身份验证

时间:2012-01-15 05:10:38

标签: iphone kerberos

是否有适用于iPhone的kerberos身份验证库? Heimdal没有适用于iOS的版本。

是否有使用Kerberos向Active Directory服务器进行身份验证的示例?

3 个答案:

答案 0 :(得分:1)

如果Apple没有为iOS提供GSS-API,那你就不走运了。您应该访问Apple网站上的iOS开发论坛。一个简单的谷歌搜索显示没有支持。

答案 1 :(得分:1)

iOS 5(可能更早)确实有一个支持Kerberos的GSS.framework。

但是,我并不完全确定如何使用它。 Apple在此处提供示例代码:https://developer.apple.com/library/mac/samplecode/KerberosGSS/

答案 2 :(得分:0)

嗯,Apple表示在iOS中对GSS API有一定程度的支持。 但令人惊讶的是,Apple在这个主题上的文档很差。 What's New in iOS 5: General System Security Framework中有注释,引用RFC 2743(包括Kerberos的所有GSS API)和头文件以获取更多详细信息。在iOS Technology Overview: Device Frameworks

中可以看到一行

当您查看/System/Library/Frameworks/GSS.framework/Versions/A/Headers时,您可以在那里找到这些标题:

  • gssapi_krb5.h
  • gssapi_netlogon.h
  • gssapi_ntlm.h
  • gssapi_spnego.h
  • gssapi.h

摘自gssapi_krb5.h:

...
/*
 * kerberos mechanism specific functions
 */

struct krb5_ccache_data;

OM_uint32 GSSAPI_LIB_FUNCTION gss_krb5_copy_ccache
(OM_uint32 * /*minor*/,
 gss_cred_id_t /*cred*/,
 struct krb5_ccache_data * /*out*/);

OM_uint32 GSSAPI_LIB_FUNCTION
gss_krb5_ccache_name(OM_uint32 * /*minor_status*/,
             const char * /*name */,
             const char ** /*out_name */);

OM_uint32 GSSAPI_LIB_FUNCTION gsskrb5_register_acceptor_identity
        (const char * /*identity*/);

OM_uint32 GSSAPI_LIB_FUNCTION krb5_gss_register_acceptor_identity
    (const char * /*identity*/);

OM_uint32 GSSAPI_LIB_FUNCTION
gsskrb5_extract_authz_data_from_sec_context
    (OM_uint32 * /*minor_status*/,
     gss_ctx_id_t /*context_handle*/,
     int /*ad_type*/,
     gss_buffer_t /*ad_data*/);

/*
 * Function declarations
 */

OM_uint32 GSSAPI_LIB_FUNCTION
gss_krb5_export_lucid_sec_context(OM_uint32 *minor_status,
                  gss_ctx_id_t *context_handle,
                  OM_uint32 version,
                  void **kctx);


OM_uint32 GSSAPI_LIB_FUNCTION
gss_krb5_free_lucid_sec_context(OM_uint32 *minor_status,
                void *kctx);

OM_uint32 GSSAPI_LIB_FUNCTION
gss_krb5_set_allowable_enctypes(OM_uint32 *minor_status,
                gss_cred_id_t cred,
                OM_uint32 num_enctypes,
                int32_t *enctypes);

GSSAPI_CPP_END
...

所以人们会期待必须有一些支持。由于我是新手并且目前声誉不佳,我只能提供两个链接。