1 martin 1.28 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.29 //
|
3 martin 1.28 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.29 //
|
10 martin 1.28 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.29 //
|
17 martin 1.28 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.29 //
|
20 martin 1.28 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.29 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.28 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.29 //
|
28 martin 1.28 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #include <Pegasus/Common/Config.h>
33 #include <Pegasus/Common/Tracer.h>
34 #include "AuthenticationInfoRep.h"
|
35 h.sterling 1.10 #include <Pegasus/Common/SSLContext.h>
|
36 kumpf 1.1
37 PEGASUS_USING_STD;
38
39 PEGASUS_NAMESPACE_BEGIN
40
|
41 h.sterling 1.12 const String AuthenticationInfoRep::AUTH_TYPE_SSL = "SSL";
|
42 thilo.boehm 1.27 const String AuthenticationInfoRep::AUTH_TYPE_ZOS_LOCAL_DOMIAN_SOCKET = "LDS";
43 const String AuthenticationInfoRep::AUTH_TYPE_ZOS_ATTLS = "ATTLS";
|
44 kumpf 1.1
45 AuthenticationInfoRep::AuthenticationInfoRep(Boolean flag)
|
46 kumpf 1.25 : _connectionAuthenticated(false),
47 _wasRemotePrivilegedUserAccessChecked(false)
|
48 kumpf 1.19 {
|
49 kumpf 1.1 PEG_METHOD_ENTER(
50 TRC_AUTHENTICATION, "AuthenticationInfoRep::AuthenticationInfoRep");
51
52 PEG_METHOD_EXIT();
53 }
54
55 AuthenticationInfoRep::~AuthenticationInfoRep()
56 {
57 PEG_METHOD_ENTER(
58 TRC_AUTHENTICATION, "AuthenticationInfoRep::~AuthenticationInfoRep");
|
59 gerarda 1.4
|
60 kumpf 1.1 PEG_METHOD_EXIT();
61 }
62
|
63 kumpf 1.24 void AuthenticationInfoRep::setConnectionAuthenticated(
|
64 sushma.fernandes 1.23 Boolean connectionAuthenticated)
|
65 kumpf 1.1 {
|
66 kumpf 1.24 PEG_METHOD_ENTER(TRC_AUTHENTICATION,
67 "AuthenticationInfoRep::setConnectionAuthenticated");
|
68 kumpf 1.1
|
69 sushma.fernandes 1.23 _connectionAuthenticated = connectionAuthenticated;
|
70 kumpf 1.1
71 PEG_METHOD_EXIT();
72 }
73
|
74 thilo.boehm 1.27 #ifdef PEGASUS_OS_ZOS
75
76 // The connection user is for z/OS only.
77 // On z/OS Unix Local Domain Sockets and sockets
78 // protected by AT-TLS are able to get the user ID of
79 // the connected user.
|
80 kumpf 1.30 // This information is needed for later authentication
81 // steps.
|
82 thilo.boehm 1.27
83 void AuthenticationInfoRep::setConnectionUser(const String& userName)
84 {
85 PEG_METHOD_ENTER(
86 TRC_AUTHENTICATION, "AuthenticationInfoRep::setConnectionUser()");
87
88 _connectionUser = userName;
89
90 PEG_METHOD_EXIT();
91 }
92 #endif
93
|
94 kumpf 1.24 void AuthenticationInfoRep::setAuthenticatedUser(const String& userName)
|
95 kumpf 1.1 {
96 PEG_METHOD_ENTER(
97 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthenticatedUser");
98
99 _authUser = userName;
|
100 kumpf 1.6
101 PEG_METHOD_EXIT();
102 }
103
|
104 kumpf 1.24 void AuthenticationInfoRep::setAuthenticatedPassword(const String& password)
|
105 kumpf 1.6 {
106 PEG_METHOD_ENTER(
107 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthenticatedPassword");
108
109 _authPassword = password;
|
110 kumpf 1.1
111 PEG_METHOD_EXIT();
112 }
113
|
114 kumpf 1.26 void AuthenticationInfoRep::setLocalAuthFilePath(const String& filePath)
115 {
116 PEG_METHOD_ENTER(
117 TRC_AUTHENTICATION, "AuthenticationInfoRep::setLocalAuthFilePath");
118
119 _localAuthFilePath = filePath;
120
121 PEG_METHOD_EXIT();
122 }
123
|
124 kumpf 1.24 void AuthenticationInfoRep::setLocalAuthSecret(const String& secret)
|
125 kumpf 1.1 {
126 PEG_METHOD_ENTER(
|
127 sushma.fernandes 1.22 TRC_AUTHENTICATION, "AuthenticationInfoRep::setLocalAuthSecret");
|
128 kumpf 1.1
|
129 sushma.fernandes 1.22 _localAuthSecret = secret;
|
130 kumpf 1.1
131 PEG_METHOD_EXIT();
132 }
133
|
134 kumpf 1.24 void AuthenticationInfoRep::setAuthType(const String& authType)
|
135 kumpf 1.1 {
136 PEG_METHOD_ENTER(
137 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthType");
138
139 _authType = authType;
140
141 PEG_METHOD_EXIT();
142 }
|
143 gerarda 1.5
144 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
|
145 kumpf 1.24 void AuthenticationInfoRep::setSecurityAssociation()
|
146 gerarda 1.5 {
147 PEG_METHOD_ENTER(
148 TRC_AUTHENTICATION, "AuthenticationInfoRep::setSecurityAssociation");
149
|
150 a.arora 1.8 if ( !_securityAssoc.get() )
|
151 gerarda 1.5 {
|
152 a.arora 1.9 _securityAssoc.reset(new CIMKerberosSecurityAssociation);
|
153 gerarda 1.5 }
154
155 PEG_METHOD_EXIT();
156 }
157 #endif
158
|
159 kumpf 1.19 void AuthenticationInfoRep::setClientCertificateChain(
160 Array<SSLCertificateInfo*> clientCertificate)
|
161 h.sterling 1.14 {
162 PEG_METHOD_ENTER(TRC_AUTHENTICATION,
|
163 h.sterling 1.16 "AuthenticationInfoRep::setClientCertificateChain");
|
164 h.sterling 1.14
165 _clientCertificate = clientCertificate;
166
167 PEG_METHOD_EXIT();
168 }
169
|
170 kumpf 1.1 PEGASUS_NAMESPACE_END
|