{"id":51043543,"url":"https://github.com/qoretechnologies/module-krb5","last_synced_at":"2026-06-22T12:01:46.449Z","repository":{"id":350535008,"uuid":"1207269547","full_name":"qoretechnologies/module-krb5","owner":"qoretechnologies","description":"Kerberos 5 and GSSAPI module for Qore","archived":false,"fork":false,"pushed_at":"2026-04-10T19:39:14.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-04-10T21:08:03.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qoretechnologies.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING.LGPL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.doxygen.tmpl","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-10T18:58:23.000Z","updated_at":"2026-04-10T19:39:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/qoretechnologies/module-krb5","commit_stats":null,"previous_names":["qoretechnologies/module-krb5"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/qoretechnologies/module-krb5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoretechnologies%2Fmodule-krb5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoretechnologies%2Fmodule-krb5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoretechnologies%2Fmodule-krb5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoretechnologies%2Fmodule-krb5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qoretechnologies","download_url":"https://codeload.github.com/qoretechnologies/module-krb5/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoretechnologies%2Fmodule-krb5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34647750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-22T12:01:41.844Z","updated_at":"2026-06-22T12:01:46.444Z","avatar_url":"https://github.com/qoretechnologies.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Qore krb5 Module\n================\n\nThe Qore krb5 module provides Kerberos 5 and GSSAPI primitives for Qore so\nthat Qore code and Qorus integration services can participate in enterprise\nKerberos-authenticated networks as first-class citizens, alongside native\nJava and .NET services.\n\nThe binary module is named `krb5`; a small Qore-language helper module is\nprovided as `Krb5Util`.\n\nThe module provides:\n\n- Kerberos realm, credential-cache, and keytab discovery\n- Kerberos initial credential acquisition from passwords and keytabs, with\n  noninteractive service use, KDC canonicalization, PAC requests, enctype\n  restriction, and FAST armor credential caches\n- Credential metadata and credential-cache store/list/enumerate operations\n- Credential renewal and service-ticket acquisition from existing caches\n- Credential lifecycle helpers for expiry and renewal-threshold checks\n- In-memory credential caches and keytabs for tests and service setup\n- Filesystem sandbox enforcement for file-backed credential caches and\n  keytabs\n- Kerberos principal parsing, enterprise (UPN) principal parsing, and\n  structured introspection\n- Explicit GSSAPI credentials imported from Kerberos credential caches or\n  client keytabs, so GSSAPI code does not need to rely on process-global\n  default credentials\n- Initiator-side GSSAPI security contexts with configurable flags, lifetime,\n  mechanism selection, and explicit target-name type selection\n- Acceptor-side GSSAPI security contexts for service endpoints, including\n  explicit service-keytab credentials and authenticated initiator-name\n  reporting\n- Delegated credential extraction from completed acceptor contexts\n- GSSAPI channel bindings, including RFC 5929 `tls-server-end-point`\n  application data for hardened SASL/GSSAPI deployments\n- GSSAPI wrap, unwrap, and wrap-size-limit helpers for negotiated integrity\n  and confidentiality layers\n- GSSAPI MIC (Message Integrity Code) compute and verify for standalone\n  integrity tokens used in SASL/GSSAPI integrity verification\n- Credential cache collection discovery across all configured backends\n- S4U2Self credential impersonation for GSS identity-forwarding flows, plus\n  a low-level S4U2Proxy binding for caller-supplied Kerberos evidence tickets\n- GSS-level impersonated client context helper for service-to-service S4U\n  flows\n- Keytab entry removal for key rotation workflows\n- Keytab rotation helpers for highest-kvno discovery and old-entry cleanup\n- Credential renewal workflow helper for long-running services\n- Credential cache maintenance helpers for renewal and service-ticket\n  prefetch workflows\n- Kerberos environment validation with structured checks for deployment\n  diagnostics\n- a `Krb5Util` helper module with Qore-language Kerberos and SPNEGO utilities,\n  including HTTP Negotiate client/server step helpers\n\nHigher-level helper APIs should use `Logger::LoggerInterface` for diagnostics.\nLogs must not include passwords, keys, raw tickets, raw GSS tokens, or\ndelegated credential material.\n\nBuilding\n--------\n\nRequires Qore 2.0 or later and MIT Kerberos / GSSAPI development libraries.\n\n  mkdir build \u0026\u0026 cd build\n  cmake .. -DCMAKE_BUILD_TYPE=Release\n  cmake --build .\n\nTo run the tests from the repository root:\n\n  test/run-tests.sh\n\nUsing the module\n----------------\n\nQore code that needs the binary API should use:\n\n  %requires krb5\n\nQore code that needs helper functions such as\n`Krb5Util::getHostBasedServicePrincipal()` should use:\n\n  %requires Krb5Util\n\nThe helper module also includes SPNEGO helpers for HTTP Negotiate\nintegrations:\n\n  string auth = Krb5Util::buildNegotiateAuthorizationHeader(gss_token_hex);\n  string response_token = Krb5Util::extractNegotiateHeaderToken(\n      \"WWW-Authenticate: Negotiate ...\");\n  hash\u003cKrb5Util::SpnegoResponseInfo\u003e info =\n      Krb5Util::parseNegotiateResponseHeader(\"Negotiate ...\");\n\nClient/server HTTP Negotiate exchanges can use header-level step helpers:\n\n  hash\u003cKrb5Util::NegotiateClientStepInfo\u003e client_step =\n      Krb5Util::buildNegotiateClientStep(initiator, www_authenticate_header);\n  hash\u003cKrb5Util::NegotiateServerStepInfo\u003e server_step =\n      Krb5Util::acceptNegotiateAuthorizationHeader(acceptor,\n          client_step.authorization_header);\n\nCredential metadata can be evaluated without exposing key or ticket material:\n\n  hash\u003cKrb5Util::CredentialLifecycleInfo\u003e lifecycle =\n      Krb5Util::getCredentialLifecycleInfo(creds.getInfo(), 300);\n  if (lifecycle.should_renew) {\n      # renew before expiry\n  }\n\nKeytab rotation code can inspect and remove old service keys without logging\nkey material:\n\n  int highest = Krb5Util::getKeytabHighestKvno(keytab, service_principal);\n  int removed = Krb5Util::removeOldKeytabEntries(keytab, service_principal,\n      highest);\n\nLong-running services can maintain a cache and prefetch service tickets:\n\n  hash\u003cKrb5Util::CredentialCacheMaintenanceOptions\u003e maint_opts();\n  maint_opts.renew_threshold_seconds = 300;\n  maint_opts.service_principals = (\"HTTP/backend.example.com@EXAMPLE.COM\",);\n  hash\u003cKrb5Util::CredentialCacheMaintenanceResult\u003e maint =\n      Krb5Util::maintainCredentialCache(ctx, cache, maint_opts, logger);\n\nDeployment checks can require a usable service keytab:\n\n  hash\u003cKrb5Util::KerberosEnvironmentValidationOptions\u003e env_opts();\n  env_opts.require_service_principal = True;\n  hash\u003cKrb5Util::KerberosEnvironmentInfo\u003e env =\n      Krb5Util::validateKerberosEnvironment(\n          \"HTTP/qorus.example.com@EXAMPLE.COM\", logger, env_opts);\n\nSee the generated HTML documentation for the class reference, security model,\nuse cases, and runnable examples.\n\nQuestions\n---------\n\nPlease direct questions to david@qore.org.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqoretechnologies%2Fmodule-krb5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqoretechnologies%2Fmodule-krb5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqoretechnologies%2Fmodule-krb5/lists"}