1 |
|
/*
|
|
1 |
|
/*
|
|
1 |
|
/*
|
2 |
|
* License
d to the A
pache Soft
ware Found
ation (ASF
) under on
e or more
|
|
2 |
|
* License
d to the A
pache Soft
ware Found
ation (ASF
) under on
e or more
|
|
2 |
|
* License
d to the A
pache Soft
ware Found
ation (ASF
) under on
e or more
|
3 |
|
* contrib
utor licen
se agreeme
nts. See
the NOTICE
file dist
ributed wi
th
|
|
3 |
|
* contrib
utor licen
se agreeme
nts. See
the NOTICE
file dist
ributed wi
th
|
|
3 |
|
* contrib
utor licen
se agreeme
nts. See
the NOTICE
file dist
ributed wi
th
|
4 |
|
* this wo
rk for add
itional in
formation
regarding
copyright
ownership.
|
|
4 |
|
* this wo
rk for add
itional in
formation
regarding
copyright
ownership.
|
|
4 |
|
* this wo
rk for add
itional in
formation
regarding
copyright
ownership.
|
5 |
|
* The ASF
licenses
this file
to You und
er the Apa
che Licens
e, Version
2.0
|
|
5 |
|
* The ASF
licenses
this file
to You und
er the Apa
che Licens
e, Version
2.0
|
|
5 |
|
* The ASF
licenses
this file
to You und
er the Apa
che Licens
e, Version
2.0
|
6 |
|
* (the "L
icense");
you may no
t use this
file exce
pt in comp
liance wit
h
|
|
6 |
|
* (the "L
icense");
you may no
t use this
file exce
pt in comp
liance wit
h
|
|
6 |
|
* (the "L
icense");
you may no
t use this
file exce
pt in comp
liance wit
h
|
7 |
|
* the Lic
ense. You
may obtai
n a copy o
f the Lice
nse at
|
|
7 |
|
* the Lic
ense. You
may obtai
n a copy o
f the Lice
nse at
|
|
7 |
|
* the Lic
ense. You
may obtai
n a copy o
f the Lice
nse at
|
8 |
|
*
|
|
8 |
|
*
|
|
8 |
|
*
|
9 |
|
* ht
tp://www.a
pache.org/
licenses/L
ICENSE-2.0
|
|
9 |
|
* ht
tp://www.a
pache.org/
licenses/L
ICENSE-2.0
|
|
9 |
|
* ht
tp://www.a
pache.org/
licenses/L
ICENSE-2.0
|
10 |
|
*
|
|
10 |
|
*
|
|
10 |
|
*
|
11 |
|
* Unless
required b
y applicab
le law or
agreed to
in writing
, software
|
|
11 |
|
* Unless
required b
y applicab
le law or
agreed to
in writing
, software
|
|
11 |
|
* Unless
required b
y applicab
le law or
agreed to
in writing
, software
|
12 |
|
* distrib
uted under
the Licen
se is dist
ributed on
an "AS IS
" BASIS,
|
|
12 |
|
* distrib
uted under
the Licen
se is dist
ributed on
an "AS IS
" BASIS,
|
|
12 |
|
* distrib
uted under
the Licen
se is dist
ributed on
an "AS IS
" BASIS,
|
13 |
|
* WITHOUT
WARRANTIE
S OR CONDI
TIONS OF A
NY KIND, e
ither expr
ess or imp
lied.
|
|
13 |
|
* WITHOUT
WARRANTIE
S OR CONDI
TIONS OF A
NY KIND, e
ither expr
ess or imp
lied.
|
|
13 |
|
* WITHOUT
WARRANTIE
S OR CONDI
TIONS OF A
NY KIND, e
ither expr
ess or imp
lied.
|
14 |
|
* See the
License f
or the spe
cific lang
uage gover
ning permi
ssions and
|
|
14 |
|
* See the
License f
or the spe
cific lang
uage gover
ning permi
ssions and
|
|
14 |
|
* See the
License f
or the spe
cific lang
uage gover
ning permi
ssions and
|
15 |
|
* limitat
ions under
the Licen
se.
|
|
15 |
|
* limitat
ions under
the Licen
se.
|
|
15 |
|
* limitat
ions under
the Licen
se.
|
16 |
|
*/
|
|
16 |
|
*/
|
|
16 |
|
*/
|
17 |
|
|
|
17 |
|
|
|
17 |
|
|
18 |
|
|
|
18 |
|
|
|
18 |
|
|
19 |
|
package or
g.apache.c
atalina.au
thenticato
r;
|
|
19 |
|
package or
g.apache.c
atalina.au
thenticato
r;
|
|
19 |
|
package or
g.apache.c
atalina.au
thenticato
r;
|
20 |
|
|
|
20 |
|
|
|
20 |
|
|
21 |
|
|
|
21 |
|
|
|
21 |
|
|
22 |
|
public cla
ss Constan
ts {
|
|
22 |
|
public cla
ss Constan
ts {
|
|
22 |
|
public cla
ss Constan
ts {
|
23 |
|
|
|
|
|
|
|
|
|
|
24 |
|
public
static fi
nal String
Package =
"org.apac
he.catalin
a.authenti
cator";
|
|
|
|
|
|
|
|
|
25 |
|
|
|
|
|
|
|
|
|
|
26 |
|
// Aut
henticatio
n methods
for login
configurat
ion
|
|
23 |
|
// Aut
henticatio
n methods
for login
configurat
ion
|
|
23 |
|
// Aut
henticatio
n methods
for login
configurat
ion
|
27 |
|
// Ser
vlet spec
schemes ar
e defined
in HttpSer
vletReques
t
|
|
24 |
|
// Ser
vlet spec
schemes ar
e defined
in HttpSer
vletReques
t
|
|
24 |
|
// Ser
vlet spec
schemes ar
e defined
in HttpSer
vletReques
t
|
28 |
|
// Ven
dor specif
ic schemes
|
|
25 |
|
// Ven
dor specif
ic schemes
|
|
25 |
|
// Ven
dor specif
ic schemes
|
29 |
|
public
static fi
nal String
SPNEGO_ME
THOD = "SP
NEGO";
|
|
26 |
|
public
static fi
nal String
SPNEGO_ME
THOD = "SP
NEGO";
|
|
26 |
|
public
static fi
nal String
SPNEGO_ME
THOD = "SP
NEGO";
|
30 |
|
|
|
27 |
|
|
|
27 |
|
|
31 |
|
// For
m based au
thenticati
on constan
ts
|
|
28 |
|
// For
m based au
thenticati
on constan
ts
|
|
28 |
|
// For
m based au
thenticati
on constan
ts
|
32 |
|
public
static fi
nal String
FORM_ACTI
ON = "/j_s
ecurity_ch
eck";
|
|
29 |
|
public
static fi
nal String
FORM_ACTI
ON = "/j_s
ecurity_ch
eck";
|
|
29 |
|
public
static fi
nal String
FORM_ACTI
ON = "/j_s
ecurity_ch
eck";
|
33 |
|
public
static fi
nal String
FORM_PASS
WORD = "j_
password";
|
|
30 |
|
public
static fi
nal String
FORM_PASS
WORD = "j_
password";
|
|
30 |
|
public
static fi
nal String
FORM_PASS
WORD = "j_
password";
|
34 |
|
public
static fi
nal String
FORM_USER
NAME = "j_
username";
|
|
31 |
|
public
static fi
nal String
FORM_USER
NAME = "j_
username";
|
|
31 |
|
public
static fi
nal String
FORM_USER
NAME = "j_
username";
|
35 |
|
|
|
32 |
|
|
|
32 |
|
|
36 |
|
// SPN
EGO authen
tication c
onstants
|
|
33 |
|
// SPN
EGO authen
tication c
onstants
|
|
33 |
|
// SPN
EGO authen
tication c
onstants
|
37 |
|
public
static fi
nal String
KRB5_CONF
_PROPERTY
= "java.se
curity.krb
5.conf";
|
|
34 |
|
public
static fi
nal String
KRB5_CONF
_PROPERTY
= "java.se
curity.krb
5.conf";
|
|
34 |
|
public
static fi
nal String
KRB5_CONF
_PROPERTY
= "java.se
curity.krb
5.conf";
|
38 |
|
public
static fi
nal String
DEFAULT_K
RB5_CONF =
"conf/krb
5.ini";
|
|
35 |
|
public
static fi
nal String
DEFAULT_K
RB5_CONF =
"conf/krb
5.ini";
|
|
35 |
|
public
static fi
nal String
DEFAULT_K
RB5_CONF =
"conf/krb
5.ini";
|
39 |
|
public
static fi
nal String
JAAS_CONF
_PROPERTY
=
|
|
36 |
|
public
static fi
nal String
JAAS_CONF
_PROPERTY
=
|
|
36 |
|
public
static fi
nal String
JAAS_CONF
_PROPERTY
=
|
40 |
|
"java.se
curity.aut
h.login.co
nfig";
|
|
37 |
|
"java.se
curity.aut
h.login.co
nfig";
|
|
37 |
|
"java.se
curity.aut
h.login.co
nfig";
|
41 |
|
public
static fi
nal String
DEFAULT_J
AAS_CONF =
"conf/jaa
s.conf";
|
|
38 |
|
public
static fi
nal String
DEFAULT_J
AAS_CONF =
"conf/jaa
s.conf";
|
|
38 |
|
public
static fi
nal String
DEFAULT_J
AAS_CONF =
"conf/jaa
s.conf";
|
42 |
|
public
static fi
nal String
DEFAULT_L
OGIN_MODUL
E_NAME =
|
|
39 |
|
public
static fi
nal String
DEFAULT_L
OGIN_MODUL
E_NAME =
|
|
39 |
|
public
static fi
nal String
DEFAULT_L
OGIN_MODUL
E_NAME =
|
43 |
|
"c
om.sun.sec
urity.jgss
.krb5.acce
pt";
|
|
40 |
|
"c
om.sun.sec
urity.jgss
.krb5.acce
pt";
|
|
40 |
|
"c
om.sun.sec
urity.jgss
.krb5.acce
pt";
|
|
|
|
|
41 |
|
/**
|
|
|
|
|
|
|
|
|
42 |
|
* @de
precated U
nused. Wil
l be remov
ed in Tomc
at 9.
|
|
|
|
|
|
|
|
|
43 |
|
*/
|
|
|
|
|
|
|
|
|
44 |
|
@Depre
cated
|
|
|
|
|
44 |
|
public
static fi
nal String
USE_SUBJE
CT_CREDS_O
NLY_PROPER
TY =
|
|
45 |
|
public
static fi
nal String
USE_SUBJE
CT_CREDS_O
NLY_PROPER
TY =
|
|
|
|
|
45 |
|
"javax.s
ecurity.au
th.useSubj
ectCredsOn
ly";
|
|
46 |
|
"javax.s
ecurity.au
th.useSubj
ectCredsOn
ly";
|
|
|
|
|
46 |
|
|
|
47 |
|
|
|
41 |
|
|
47 |
|
// Coo
kie name f
or single
sign on su
pport
|
|
48 |
|
// Coo
kie name f
or single
sign on su
pport
|
|
42 |
|
// Coo
kie name f
or single
sign on su
pport
|
48 |
|
public
static fi
nal String
SINGLE_SI
GN_ON_COOK
IE =
|
|
49 |
|
public
static fi
nal String
SINGLE_SI
GN_ON_COOK
IE =
|
|
43 |
|
public
static fi
nal String
SINGLE_SI
GN_ON_COOK
IE =
|
49 |
|
Sy
stem.getPr
operty(
|
|
50 |
|
Sy
stem.getPr
operty(
|
|
44 |
|
Sy
stem.getPr
operty(
|
50 |
|
"org
.apache.ca
talina.aut
henticator
.Constants
.SSO_SESSI
ON_COOKIE_
NAME",
|
|
51 |
|
"org
.apache.ca
talina.aut
henticator
.Constants
.SSO_SESSI
ON_COOKIE_
NAME",
|
|
45 |
|
"org
.apache.ca
talina.aut
henticator
.Constants
.SSO_SESSI
ON_COOKIE_
NAME",
|
51 |
|
"JSE
SSIONIDSSO
");
|
|
52 |
|
"JSE
SSIONIDSSO
");
|
|
46 |
|
"JSE
SSIONIDSSO
");
|
52 |
|
|
|
53 |
|
|
|
47 |
|
|
53 |
|
|
|
54 |
|
|
|
48 |
|
|
54 |
|
// ---
----------
----------
----------
----------
----------
---- Reque
st Notes
|
|
55 |
|
// ---
----------
----------
----------
----------
----------
---- Reque
st Notes
|
|
49 |
|
// ---
----------
----------
----------
----------
----------
---- Reque
st Notes
|
55 |
|
|
|
56 |
|
|
|
50 |
|
|
56 |
|
/**
|
|
57 |
|
/**
|
|
51 |
|
/**
|
57 |
|
* The
notes key
to track
the single
-sign-on i
dentity wi
th which t
his
|
|
58 |
|
* The
notes key
to track
the single
-sign-on i
dentity wi
th which t
his
|
|
52 |
|
* The
notes key
to track
the single
-sign-on i
dentity wi
th which t
his
|
58 |
|
* req
uest is as
sociated.
|
|
59 |
|
* req
uest is as
sociated.
|
|
53 |
|
* req
uest is as
sociated.
|
59 |
|
*/
|
|
60 |
|
*/
|
|
54 |
|
*/
|
60 |
|
public
static fi
nal String
REQ_SSOID
_NOTE =
|
|
61 |
|
public
static fi
nal String
REQ_SSOID
_NOTE =
|
|
55 |
|
public
static fi
nal String
REQ_SSOID
_NOTE =
|
61 |
|
"org
.apache.ca
talina.req
uest.SSOID
";
|
|
62 |
|
"org.apa
che.catali
na.request
.SSOID";
|
|
56 |
|
"org.apa
che.catali
na.request
.SSOID";
|
62 |
|
|
|
63 |
|
|
|
57 |
|
|
63 |
|
|
|
64 |
|
|
|
58 |
|
|
|
|
|
|
65 |
|
public
static fi
nal String
REQ_JASPI
C_SUBJECT_
NOTE =
|
|
59 |
|
public
static fi
nal String
REQ_JASPI
C_SUBJECT_
NOTE =
|
|
|
|
|
66 |
|
"org.apa
che.catali
na.authent
icator.jas
pic.SUBJEC
T";
|
|
60 |
|
"org.apa
che.catali
na.authent
icator.jas
pic.SUBJEC
T";
|
|
|
|
|
67 |
|
|
|
61 |
|
|
|
|
|
|
68 |
|
|
|
62 |
|
|
64 |
|
// ---
----------
----------
----------
----------
----------
----- Sess
ion Notes
|
|
69 |
|
// ---
----------
----------
----------
----------
----------
----- Sess
ion Notes
|
|
63 |
|
// ---
----------
----------
----------
----------
----------
----- Sess
ion Notes
|
65 |
|
|
|
70 |
|
|
|
64 |
|
|
66 |
|
|
|
71 |
|
|
|
65 |
|
|
67 |
|
/**
|
|
72 |
|
/**
|
|
66 |
|
/**
|
68 |
|
* If
the <code>
cache</cod
e> propert
y of our a
uthenticat
or is set,
and
|
|
73 |
|
* If
the <code>
cache</cod
e> propert
y of our a
uthenticat
or is set,
and
|
|
67 |
|
* If
the <code>
cache</cod
e> propert
y of our a
uthenticat
or is set,
and
|
69 |
|
* the
current r
equest is
part of a
session, a
uthenticat
ion inform
ation
|
|
74 |
|
* the
current r
equest is
part of a
session, a
uthenticat
ion inform
ation
|
|
68 |
|
* the
current r
equest is
part of a
session, a
uthenticat
ion inform
ation
|
70 |
|
* wil
l be cache
d to avoid
the need
for repeat
ed calls t
o
|
|
75 |
|
* wil
l be cache
d to avoid
the need
for repeat
ed calls t
o
|
|
69 |
|
* wil
l be cache
d to avoid
the need
for repeat
ed calls t
o
|
71 |
|
* <co
de>Realm.a
uthenticat
e()</code>
, under th
e followin
g keys:
|
|
76 |
|
* <co
de>Realm.a
uthenticat
e()</code>
, under th
e followin
g keys:
|
|
70 |
|
* <co
de>Realm.a
uthenticat
e()</code>
, under th
e followin
g keys:
|
72 |
|
*/
|
|
77 |
|
*/
|
|
71 |
|
*/
|
73 |
|
|
|
78 |
|
|
|
72 |
|
|
74 |
|
|
|
79 |
|
|
|
73 |
|
|
75 |
|
/**
|
|
80 |
|
/**
|
|
74 |
|
/**
|
76 |
|
* The
notes key
for the p
assword us
ed to auth
enticate t
his user.
|
|
81 |
|
* The
notes key
for the p
assword us
ed to auth
enticate t
his user.
|
|
75 |
|
* The
notes key
for the p
assword us
ed to auth
enticate t
his user.
|
77 |
|
*/
|
|
82 |
|
*/
|
|
76 |
|
*/
|
78 |
|
public
static fi
nal String
SESS_PASS
WORD_NOTE
=
|
|
83 |
|
public
static fi
nal String
SESS_PASS
WORD_NOTE
=
|
|
77 |
|
public
static fi
nal String
SESS_PASS
WORD_NOTE
=
|
79 |
|
"org
.apache.ca
talina.ses
sion.PASSW
ORD";
|
|
84 |
|
"org
.apache.ca
talina.ses
sion.PASSW
ORD";
|
|
78 |
|
"org
.apache.ca
talina.ses
sion.PASSW
ORD";
|
80 |
|
|
|
85 |
|
|
|
79 |
|
|
81 |
|
|
|
86 |
|
|
|
80 |
|
|
82 |
|
/**
|
|
87 |
|
/**
|
|
81 |
|
/**
|
83 |
|
* The
notes key
for the u
sername us
ed to auth
enticate t
his user.
|
|
88 |
|
* The
notes key
for the u
sername us
ed to auth
enticate t
his user.
|
|
82 |
|
* The
notes key
for the u
sername us
ed to auth
enticate t
his user.
|
84 |
|
*/
|
|
89 |
|
*/
|
|
83 |
|
*/
|
85 |
|
public
static fi
nal String
SESS_USER
NAME_NOTE
=
|
|
90 |
|
public
static fi
nal String
SESS_USER
NAME_NOTE
=
|
|
84 |
|
public
static fi
nal String
SESS_USER
NAME_NOTE
=
|
86 |
|
"org
.apache.ca
talina.ses
sion.USERN
AME";
|
|
91 |
|
"org
.apache.ca
talina.ses
sion.USERN
AME";
|
|
85 |
|
"org
.apache.ca
talina.ses
sion.USERN
AME";
|
87 |
|
|
|
92 |
|
|
|
86 |
|
|
88 |
|
|
|
93 |
|
|
|
87 |
|
|
89 |
|
/**
|
|
94 |
|
/**
|
|
88 |
|
/**
|
90 |
|
* The
following
note keys
are used
during for
m login pr
ocessing t
o
|
|
95 |
|
* The
following
note keys
are used
during for
m login pr
ocessing t
o
|
|
89 |
|
* The
following
note keys
are used
during for
m login pr
ocessing t
o
|
91 |
|
* cac
he require
d informat
ion prior
to the com
pletion of
authentic
ation.
|
|
96 |
|
* cac
he require
d informat
ion prior
to the com
pletion of
authentic
ation.
|
|
90 |
|
* cac
he require
d informat
ion prior
to the com
pletion of
authentic
ation.
|
92 |
|
*/
|
|
97 |
|
*/
|
|
91 |
|
*/
|
93 |
|
|
|
98 |
|
|
|
92 |
|
|
94 |
|
|
|
99 |
|
|
|
93 |
|
|
95 |
|
/**
|
|
100 |
|
/**
|
|
94 |
|
/**
|
96 |
|
* The
previousl
y authenti
cated prin
cipal (if
caching is
disabled)
.
|
|
101 |
|
* The
previousl
y authenti
cated prin
cipal (if
caching is
disabled)
.
|
|
95 |
|
* The
previousl
y authenti
cated prin
cipal (if
caching is
disabled)
.
|
97 |
|
*/
|
|
102 |
|
*/
|
|
96 |
|
*/
|
98 |
|
public
static fi
nal String
FORM_PRIN
CIPAL_NOTE
=
|
|
103 |
|
public
static fi
nal String
FORM_PRIN
CIPAL_NOTE
=
|
|
97 |
|
public
static fi
nal String
FORM_PRIN
CIPAL_NOTE
=
|
99 |
|
"o
rg.apache.
catalina.a
uthenticat
or.PRINCIP
AL";
|
|
104 |
|
"o
rg.apache.
catalina.a
uthenticat
or.PRINCIP
AL";
|
|
98 |
|
"o
rg.apache.
catalina.a
uthenticat
or.PRINCIP
AL";
|
100 |
|
|
|
105 |
|
|
|
99 |
|
|
101 |
|
|
|
106 |
|
|
|
100 |
|
|
102 |
|
/**
|
|
107 |
|
/**
|
|
101 |
|
/**
|
103 |
|
* The
original
request in
formation,
to which
the user w
ill be
|
|
108 |
|
* The
original
request in
formation,
to which
the user w
ill be
|
|
102 |
|
* The
original
request in
formation,
to which
the user w
ill be
|
104 |
|
* red
irected if
authentic
ation succ
eeds.
|
|
109 |
|
* red
irected if
authentic
ation succ
eeds.
|
|
103 |
|
* red
irected if
authentic
ation succ
eeds.
|
105 |
|
*/
|
|
110 |
|
*/
|
|
104 |
|
*/
|
106 |
|
public
static fi
nal String
FORM_REQU
EST_NOTE =
|
|
111 |
|
public
static fi
nal String
FORM_REQU
EST_NOTE =
|
|
105 |
|
public
static fi
nal String
FORM_REQU
EST_NOTE =
|
107 |
|
"o
rg.apache.
catalina.a
uthenticat
or.REQUEST
";
|
|
112 |
|
"o
rg.apache.
catalina.a
uthenticat
or.REQUEST
";
|
|
106 |
|
"o
rg.apache.
catalina.a
uthenticat
or.REQUEST
";
|
108 |
|
|
|
113 |
|
|
|
107 |
|
|
109 |
|
|
|
114 |
|
|
|
108 |
|
|
110 |
|
}
|
|
115 |
|
}
|
|
109 |
|
}
|