From 8cf258cea17918b5d480f9446c7ab4a2048d34e0 Mon Sep 17 00:00:00 2001 From: rebeccc Date: Thu, 4 Jun 2020 12:07:03 -0400 Subject: [PATCH] Update tutorial to make server_name equal FQDN The introduction shows the differences between NameTypes and accidentally uses a hardcoded value for server_name, which is a variable that is used to make calls later in the code. By changing server_name to a FQDN, this variable will work for anybody using the tutorial. [rharwood@redhat.com: Shrunk scope of change.] --- docs/source/basic-tutorial.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/basic-tutorial.md b/docs/source/basic-tutorial.md index f11a3dd3..25b9232b 100644 --- a/docs/source/basic-tutorial.md +++ b/docs/source/basic-tutorial.md @@ -43,12 +43,12 @@ Suppose we wanted to refer to an HTTP server on the current host. We could refer to it as a *host-based service*, or in the default mechanism form (in this case, for krb5): - >>> server_hostbased_name = gssapi.Name('HTTP@' + FQDN, name_type=gssapi.NameType.hostbased_service) + >>> server_hostbased_name = gssapi.Name(f"HTTP@{FQDN}", name_type=gssapi.NameType.hostbased_service) >>> server_hostbased_name - Name(b'HTTP@sross', ) - >>> server_name = gssapi.Name('HTTP/sross@') + Name(b'HTTP@seton.mivehind.net', ) + >>> server_name = gssapi.Name(f"HTTP/{FQDN}@") >>> server_name - Name(b'HTTP/sross@', None) + Name(b'HTTP/seton.mivehind.net@', None) >>> These are both effectively the same, but if we *canonicalize* both