However, this has made me wonder: why do this at all? What is the
possible security gain here? It's not the default in the code; you have
to explicitly write code to enable this behavior. But I can't really
think of a case where NOT having strict acceptor checking is a security problem; I could maybe squint and envision some kind of weird hosted
server setup where it might matter, but I'm not sure that is ever done
in the real world. I will admit it is entirely possible I am missing something; if I am, I'd sure like to understand what I am missing.
However, this has made me wonder: why do this at all? What is the
possible security gain here? It's not the default in the code; you have
to explicitly write code to enable this behavior. But I can't really
think of a case where NOT having strict acceptor checking is a security
problem; I could maybe squint and envision some kind of weird hosted
server setup where it might matter, but I'm not sure that is ever done
in the real world. I will admit it is entirely possible I am missing
something; if I am, I'd sure like to understand what I am missing.
I have always operated under the theory that one should make sure that
the keytab accepts exactly the set of principals that are required.
This is something that is under the ultimate control of the system >administrator. When an application turns on strict acceptor checking,
they remove this configrability from the system administrator which I
think makes the system much less flexible.
However, this has made me wonder: why do this at all? What is the possible security gain here? It's not the default in the code; you have to explicitly write code to enable this behavior. But I can't really think of a case where NOT having strict acceptor checking is a security problem; I could maybe squint and envision some kind of weird hosted server setup where it might matter, but I'm not sure that is ever done
in the real world. I will admit it is entirely possible I am missing something; if I am, I'd sure like to understand what I am missing.
I have always operated under the theory that one should make sure that
the keytab accepts exactly the set of principals that are required.
This is something that is under the ultimate control of the system administrator. When an application turns on strict acceptor checking,
they remove this configrability from the system administrator which I
think makes the system much less flexible.
I'm completely with you, but clearly plenty of application writers do not agree with this sentiment! So I'm wondering what I am missing.
I'm completely with you, but clearly plenty of application writers do not
agree with this sentiment! So I'm wondering what I am missing.
There *are* weird cases where the keytab needs to contain multiple keys
for different principals, but you want to use only one of them for >*accepting* connections.
These days you can easily have separate keytabs for "client" vs
"server" keys and programmatically specify which keytab you want via >gss_acquire_cred_from(), but it hasn't always been like that. In the
past in some cases your only option was to use a fixed specific file on
the filesystem not even env vars...
notI'm completely with you, but clearly plenty of application writers do
agree with this sentiment! So I'm wondering what I am missing.
There *are* weird cases where the keytab needs to contain multiple keys
for different principals, but you want to use only one of them for >*accepting* connections.
These days you can easily have separate keytabs for "client" vs
"server" keys and programmatically specify which keytab you want via >gss_acquire_cred_from(), but it hasn't always been like that. In the
past in some cases your only option was to use a fixed specific file on
the filesystem not even env vars...
I'm certainly kind of a grizzled old Kerberos user at this point and
I'm willing to believe that these weird corner cases exist, but part of
me wonders out loud how this attitude got proliferated to so many applications.
practice that has caused me a ton of pain over a few decades is justified
by what I would charitably classify as "vague hand-waving".
the local hostname is used to build a "host" principal and passed in as
the server argument to krb5_verify_init_creds(). If you pass in NULL
instead to the server argument, krb5_verify_init_creds() will try
every "host" principal in the local keytab until one succeeds.
this is just to verify a Kerberos password, I am trying to come up with
any kind of scenario where the default behavior of krb5_verify_init_creds() would cause a security problem. If there IS no such scenario, I'm
going to try to submit a patch upstream to change this behavior.
Also, I guess I find it personally frustating that a
practice that has caused me a ton of pain over a few decades is justified
by what I would charitably classify as "vague hand-waving".
Me too. We've been recommending calling gss_accept_sec_context with >GSS_C_NO_CREDENTIAL for a long time, and almost no one does that. it's
very annoying.
But, fine, let's talk about a specific example. In the case of sudo,
the local hostname is used to build a "host" principal and passed in as
the server argument to krb5_verify_init_creds(). If you pass in NULL
instead to the server argument, krb5_verify_init_creds() will try
every "host" principal in the local keytab until one succeeds.
AFAIK, that's a relatively recent feature in the grand scheme of things.
well, the keytab could contain a copy of a key that is known to other >services or to some user. even a principal intended to be used only as a >client could be an issue, if an attacker knows the key and can print valid >tickets.
Me too. We've been recommending calling gss_accept_sec_context with
GSS_C_NO_CREDENTIAL for a long time, and almost no one does that. it's
very annoying.
It's comforting to know that at least I'm not the only old, grizzled
Kerberos user that feels that way.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 02:54:46 |
Calls: | 10,387 |
Calls today: | 2 |
Files: | 14,061 |
Messages: | 6,416,755 |