1 karl 1.17 //%2006////////////////////////////////////////////////////////////////////////
|
2 kumpf 1.1 //
|
3 karl 1.13 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.8 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.13 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.15 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.17 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 kumpf 1.1 //
|
14 kumpf 1.2 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
20 //
21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
29 kumpf 1.1 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_AuthenticationInfoRep_h
35 #define Pegasus_AuthenticationInfoRep_h
36
37 #include <Pegasus/Common/Config.h>
|
38 h.sterling 1.16 #include <Pegasus/Common/ArrayInternal.h>
|
39 kumpf 1.1 #include <Pegasus/Common/String.h>
40 #include <Pegasus/Common/Sharable.h>
|
41 kumpf 1.3 #include <Pegasus/Common/Linkage.h>
|
42 h.sterling 1.10 #include <Pegasus/Common/SSLContext.h>
|
43 kumpf 1.1
|
44 gerarda 1.4 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
|
45 gerarda 1.6 #include <Pegasus/Common/CIMKerberosSecurityAssociation.h>
|
46 gerarda 1.4 #endif
|
47 kumpf 1.1
48 PEGASUS_NAMESPACE_BEGIN
49
50 class AuthenticationInfo;
51
52 /**
|
53 kumpf 1.20 This class keeps the authentication information of a connection
|
54 kumpf 1.1 persistent until the connection is destroyed.
55 */
56 class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep : public Sharable
57 {
58 public:
59
|
60 kumpf 1.20 //ATTN: we should be using an enumeration for the authtype instead of a
61 //string.
62 //In the AuthenticationManager, the authtype is set to Basic, Digest, etc
63 //We also need to be able to check whether the type is SSL, so I'm adding a
64 //string here to make it less arbitrary. PEP165
65 static const String AUTH_TYPE_SSL;
|
66 thilo.boehm 1.27 static const String AUTH_TYPE_ZOS_LOCAL_DOMIAN_SOCKET;
67 static const String AUTH_TYPE_ZOS_ATTLS;
|
68 kumpf 1.20
|
69 kumpf 1.1 AuthenticationInfoRep(Boolean flag);
70
71 ~AuthenticationInfoRep();
72
|
73 sushma.fernandes 1.25 void setConnectionAuthenticated(Boolean connectionAuthenticated);
|
74 kumpf 1.1
|
75 kumpf 1.20 String getAuthenticatedUser() const
76 {
|
77 kumpf 1.1 return _authUser;
|
78 kumpf 1.20 }
|
79 kumpf 1.1
80 void setAuthenticatedUser(const String& userName);
81
|
82 thilo.boehm 1.27 #ifdef PEGASUS_OS_ZOS
83
84 // The connection user is for z/OS only.
85 // On z/OS Unix Local Domain Sockets and sockets
86 // protected by AT-TLS are able to get the user ID of
87 // the connected user.
88 // This information is needed for later authentication
89 // steps.
90
91 String getConnectionUser() const
92 {
93 return _connectionUser;
94 }
95
96 void setConnectionUser(const String& userName);
97
98 #endif
99
|
100 kumpf 1.20 String getAuthenticatedPassword() const
101 {
|
102 kumpf 1.7 return _authPassword;
|
103 kumpf 1.20 }
|
104 kumpf 1.7
105 void setAuthenticatedPassword(const String& password);
106
|
107 kumpf 1.26 String getLocalAuthFilePath() const
108 {
109 return _localAuthFilePath;
110 }
111
112 void setLocalAuthFilePath(const String& filePath);
113
|
114 sushma.fernandes 1.24 String getLocalAuthSecret() const
|
115 kumpf 1.20 {
|
116 sushma.fernandes 1.24 return _localAuthSecret;
|
117 kumpf 1.20 }
|
118 kumpf 1.1
|
119 sushma.fernandes 1.24 void setLocalAuthSecret(const String& secret);
|
120 kumpf 1.1
|
121 sushma.fernandes 1.25 Boolean isConnectionAuthenticated() const
|
122 kumpf 1.20 {
|
123 sushma.fernandes 1.25 return _connectionAuthenticated;
|
124 kumpf 1.20 }
|
125 kumpf 1.1
|
126 kumpf 1.20 String getAuthType() const
127 {
|
128 kumpf 1.1 return _authType;
|
129 kumpf 1.20 }
|
130 kumpf 1.1
131 void setAuthType(const String& authType);
132
|
133 sushma.fernandes 1.19 void setIpAddress(const String& ipAddress)
134 {
135 _ipAddress = ipAddress;
136 }
137
138 String getIpAddress()
139 {
140 return _ipAddress;
141 }
142
|
143 gerarda 1.4 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
|
144 kumpf 1.20 CIMKerberosSecurityAssociation* getSecurityAssociation() const
145 {
|
146 a.arora 1.9 return _securityAssoc.get();
|
147 gerarda 1.5 }
|
148 sushma.fernandes 1.19
|
149 gerarda 1.5 void setSecurityAssociation();
|
150 gerarda 1.4 #endif
151
|
152 sushma.fernandes 1.18 Array<SSLCertificateInfo*> getClientCertificateChain()
|
153 kumpf 1.11 {
|
154 sushma.fernandes 1.18 return _clientCertificate;
|
155 kumpf 1.11 }
156
|
157 kumpf 1.23 void setClientCertificateChain(
158 Array<SSLCertificateInfo*> clientCertificate);
|
159 h.sterling 1.14
|
160 marek 1.21 void setRemotePrivilegedUserAccessChecked()
161 {
162 _wasRemotePrivilegedUserAccessChecked = true;
163 }
|
164 kumpf 1.22
|
165 marek 1.21 Boolean getRemotePrivilegedUserAccessChecked()
166 {
167 return _wasRemotePrivilegedUserAccessChecked;
168 }
169
|
170 kumpf 1.1 private:
171
172 /** Constructors */
173 AuthenticationInfoRep();
174
175 AuthenticationInfoRep(const AuthenticationInfoRep& x);
176
177 AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x);
178
179 String _authUser;
|
180 kumpf 1.7 String _authPassword;
|
181 sushma.fernandes 1.24 String _localAuthSecret;
|
182 kumpf 1.26 String _localAuthFilePath;
|
183 thilo.boehm 1.27 #ifdef PEGASUS_OS_ZOS
184 String _connectionUser;
185 #endif
|
186 kumpf 1.1 String _authType;
|
187 sushma.fernandes 1.25 Boolean _connectionAuthenticated;
|
188 sushma.fernandes 1.19 String _ipAddress;
|
189 gerarda 1.4 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
|
190 a.arora 1.9 AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101
|
191 gerarda 1.4 #endif
|
192 marek 1.21 Boolean _wasRemotePrivilegedUserAccessChecked;
|
193 h.sterling 1.10
|
194 sushma.fernandes 1.18 Array<SSLCertificateInfo*> _clientCertificate;
|
195 kumpf 1.1 };
196
197 PEGASUS_NAMESPACE_END
198
199 #endif /* Pegasus_AuthenticationInfoRep_h*/
|