mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-23 18:23:25 +08:00
30da3447d2
[auth-options.c auth-options.h auth.c auth.h auth2-pubkey.c] [key.c servconf.c servconf.h sshd.8 sshd_config.5] add some optional indirection to matching of principal names listed in certificates. Currently, a certificate must include the a user's name to be accepted for authentication. This change adds the ability to specify a list of certificate principal names that are acceptable. When authenticating using a CA trusted through ~/.ssh/authorized_keys, this adds a new principals="name1[,name2,...]" key option. For CAs listed through sshd_config's TrustedCAKeys option, a new config option "AuthorizedPrincipalsFile" specifies a per-user file containing the list of acceptable names. If either option is absent, the current behaviour of requiring the username to appear in principals continues to apply. These options are useful for role accounts, disjoint account namespaces and "user@realm"-style naming policies in certificates. feedback and ok markus@
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/* $OpenBSD: auth-options.h,v 1.20 2010/05/07 11:30:29 djm Exp $ */
|
|
|
|
/*
|
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
|
* All rights reserved
|
|
*
|
|
* As far as I am concerned, the code I have written for this software
|
|
* can be used freely for any purpose. Any derived versions of this
|
|
* software must be clearly marked as such, and if the derived work is
|
|
* incompatible with the protocol description in the RFC file, it must be
|
|
* called by a name other than "ssh" or "Secure Shell".
|
|
*/
|
|
|
|
#ifndef AUTH_OPTIONS_H
|
|
#define AUTH_OPTIONS_H
|
|
|
|
/* Linked list of custom environment strings */
|
|
struct envstring {
|
|
struct envstring *next;
|
|
char *s;
|
|
};
|
|
|
|
/* Flags that may be set in authorized_keys options. */
|
|
extern int no_port_forwarding_flag;
|
|
extern int no_agent_forwarding_flag;
|
|
extern int no_x11_forwarding_flag;
|
|
extern int no_pty_flag;
|
|
extern int no_user_rc;
|
|
extern char *forced_command;
|
|
extern struct envstring *custom_environment;
|
|
extern int forced_tun_device;
|
|
extern int key_is_cert_authority;
|
|
extern char *authorized_principals;
|
|
|
|
int auth_parse_options(struct passwd *, char *, char *, u_long);
|
|
void auth_clear_options(void);
|
|
int auth_cert_options(Key *, struct passwd *);
|
|
|
|
#endif
|