package krb

  1. Overview
  2. Docs
A library for using Kerberos for both Rpc and Tcp communication

Install

Dune Dependency

Authors

Maintainers

Sources

krb-v0.16.0.tar.gz
sha256=353675621e4c5a888f2483dc1bb7281bd17ce4ed7dfd2f40142257f98db7c77d

doc/src/krb.public/realm.ml.html

Source file realm.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
open! Core
open Async
open Import

type t = string [@@deriving bin_io, compare, hash, sexp]

let test_realm = "TEST.REALM.COM"

(* In [Krb.Mode.Test_with_principal], we may not have a kerberos
   environment available and can't query for the actual default
   realm.

   However, if we are expecting to reach out to an actual KDC (either
   ambient or within a sandbox), we should have a kerberos environment
   available. *)
let expecting_kdc_available = Config.am_sandboxed || Config.am_exempt_from_sandbox

let default () =
  if am_running_test && not expecting_kdc_available
  then Deferred.Or_error.return test_realm
  else Internal.Principal.default_realm ()
;;
OCaml

Innovation. Community. Security.