(file) Return to AuthenticationInfoRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  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             #ifndef Pegasus_AuthenticationInfoRep_h
 33             #define Pegasus_AuthenticationInfoRep_h
 34             
 35             #include <Pegasus/Common/Config.h>
 36 h.sterling 1.16 #include <Pegasus/Common/ArrayInternal.h>
 37 kumpf      1.1  #include <Pegasus/Common/String.h>
 38                 #include <Pegasus/Common/Sharable.h>
 39 kumpf      1.3  #include <Pegasus/Common/Linkage.h>
 40 h.sterling 1.10 #include <Pegasus/Common/SSLContext.h>
 41 kumpf      1.1  
 42 gerarda    1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
 43 gerarda    1.6  #include <Pegasus/Common/CIMKerberosSecurityAssociation.h>
 44 gerarda    1.4  #endif
 45 kumpf      1.1  
 46                 PEGASUS_NAMESPACE_BEGIN
 47                 
 48                 class AuthenticationInfo;
 49                 
 50                 /**
 51 kumpf      1.20     This class keeps the authentication information of a connection
 52 kumpf      1.1      persistent until the connection is destroyed.
 53                 */
 54                 class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep :  public Sharable
 55                 {
 56                 public:
 57                 
 58 kumpf      1.20     //ATTN: we should be using an enumeration for the authtype instead of a
 59                     //string.
 60                     //In the AuthenticationManager, the authtype is set to Basic, Digest, etc
 61                     //We also need to be able to check whether the type is SSL, so I'm adding a
 62                     //string here to make it less arbitrary.  PEP165
 63                     static const String AUTH_TYPE_SSL;
 64 thilo.boehm 1.27     static const String AUTH_TYPE_ZOS_LOCAL_DOMIAN_SOCKET;
 65                      static const String AUTH_TYPE_ZOS_ATTLS;
 66 kumpf       1.20 
 67 kumpf       1.1      AuthenticationInfoRep(Boolean flag);
 68                  
 69                      ~AuthenticationInfoRep();
 70                  
 71 sushma.fernandes 1.25     void   setConnectionAuthenticated(Boolean connectionAuthenticated);
 72 kumpf            1.1  
 73 kumpf            1.20     String getAuthenticatedUser() const
 74                           {
 75 kumpf            1.1          return _authUser;
 76 kumpf            1.20     }
 77 kumpf            1.1  
 78                           void   setAuthenticatedUser(const String& userName);
 79                       
 80 thilo.boehm      1.27 #ifdef PEGASUS_OS_ZOS
 81                       
 82                           // The connection user is for z/OS only.
 83                           // On z/OS Unix Local Domain Sockets and sockets
 84                           // protected by AT-TLS are able to get the user ID of
 85                           // the connected user.
 86 kumpf            1.30     // This information is needed for later authentication
 87                           // steps.
 88 thilo.boehm      1.27 
 89                           String getConnectionUser() const
 90                           {
 91                               return _connectionUser;
 92                           }
 93                       
 94                           void   setConnectionUser(const String& userName);
 95                       
 96                       #endif
 97                       
 98 kumpf            1.20     String getAuthenticatedPassword() const
 99                           {
100 kumpf            1.7          return _authPassword;
101 kumpf            1.20     }
102 kumpf            1.7  
103                           void   setAuthenticatedPassword(const String& password);
104                       
105 kumpf            1.26     String getLocalAuthFilePath() const
106                           {
107                               return _localAuthFilePath;
108                           }
109                       
110                           void setLocalAuthFilePath(const String& filePath);
111                       
112 sushma.fernandes 1.24     String getLocalAuthSecret() const
113 kumpf            1.20     {
114 sushma.fernandes 1.24         return _localAuthSecret;
115 kumpf            1.20     }
116 kumpf            1.1  
117 sushma.fernandes 1.24     void   setLocalAuthSecret(const String& secret);
118 kumpf            1.1  
119 sushma.fernandes 1.25     Boolean isConnectionAuthenticated() const
120 kumpf            1.20     {
121 kumpf            1.30         return _connectionAuthenticated;
122 kumpf            1.20     }
123 kumpf            1.1  
124 kumpf            1.20     String getAuthType() const
125                           {
126 kumpf            1.1          return _authType;
127 kumpf            1.20     }
128 kumpf            1.1  
129                           void   setAuthType(const String& authType);
130                       
131 sushma.fernandes 1.19     void setIpAddress(const String& ipAddress)
132                           {
133                               _ipAddress = ipAddress;
134                           }
135                       
136                           String getIpAddress()
137                           {
138                               return _ipAddress;
139                           }
140                       
141 gerarda          1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
142 kumpf            1.20     CIMKerberosSecurityAssociation* getSecurityAssociation() const
143                           {
144 a.arora          1.9          return _securityAssoc.get();
145 gerarda          1.5      }
146 sushma.fernandes 1.19 
147 gerarda          1.5      void setSecurityAssociation();
148 gerarda          1.4  #endif
149                       
150 sushma.fernandes 1.18     Array<SSLCertificateInfo*> getClientCertificateChain()
151 kumpf            1.11     {
152 sushma.fernandes 1.18         return _clientCertificate;
153 kumpf            1.11     }
154                       
155 kumpf            1.23     void setClientCertificateChain(
156                               Array<SSLCertificateInfo*> clientCertificate);
157 h.sterling       1.14 
158 marek            1.21     void setRemotePrivilegedUserAccessChecked()
159                           {
160                               _wasRemotePrivilegedUserAccessChecked = true;
161                           }
162 kumpf            1.22 
163 marek            1.21     Boolean getRemotePrivilegedUserAccessChecked()
164                           {
165                               return _wasRemotePrivilegedUserAccessChecked;
166                           }
167                       
168 kumpf            1.1  private:
169                       
170                           /** Constructors  */
171                           AuthenticationInfoRep();
172                       
173                           AuthenticationInfoRep(const AuthenticationInfoRep& x);
174                       
175                           AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x);
176                       
177                           String  _authUser;
178 kumpf            1.7      String  _authPassword;
179 sushma.fernandes 1.24     String  _localAuthSecret;
180 kumpf            1.26     String  _localAuthFilePath;
181 thilo.boehm      1.27 #ifdef PEGASUS_OS_ZOS
182                           String  _connectionUser;
183                       #endif
184 kumpf            1.1      String  _authType;
185 sushma.fernandes 1.25     Boolean _connectionAuthenticated;
186 sushma.fernandes 1.19     String  _ipAddress;
187 gerarda          1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
188 a.arora          1.9      AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101
189 gerarda          1.4  #endif
190 marek            1.21     Boolean _wasRemotePrivilegedUserAccessChecked;
191 h.sterling       1.10 
192 sushma.fernandes 1.18     Array<SSLCertificateInfo*> _clientCertificate;
193 kumpf            1.1  };
194                       
195                       PEGASUS_NAMESPACE_END
196                       
197                       #endif   /* Pegasus_AuthenticationInfoRep_h*/

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2