SEAL( ) method
- Last Updated: January 18, 2024
- 3 minute read
- OpenEdge
- Version 12.8
- Documentation
As part of a successful application-performed authentication operation, you can invoke this method on an unsealed client-principal in order to seal the object using the domain access code you pass as a parameter. Sealing the client-principal begins a login session to assert the identity it represents. You can then pass the sealed object as input to the SECURITY-POLICY:SET-CLIENT( ) method method or the SET-DB-CLIENT function to set the identity for the current ABL session and one or more of its database connections using a single sign-on (SSO) operation.
This method returns TRUE if successful and FALSE otherwise.
Return type: LOGICAL
Applies to: Client-principal object handle
Syntax
|
- domain-access-code
- A case-sensitive character expression containing the clear text access
code that you have defined for the user's domain. The AVM uses this access code to
generate the message authentication code (MAC) with which to seal the client-principal
object. The AVM converts this access code to UTF-8 before using it, which ensures a
consistent value regardless of code page settings. A matching domain with the specified
access code must be registered in a trusted domain registry in order to successfully
validate the identity that is sealed in this client-principal object.CAUTION: The sealed client-principal created by this method is not usable if no trusted domain registry contains the same combination of domain name and access code. Also, note that given any client-principal that is sealed with it, this domain access code provides session and database access when validated using a single sign-on (SSO) operation against a trusted domain registry that contains a matching domain with the same access code. Therefore, Progress Software corporation strongly recommends that you take steps to hide or otherwise protect the domain access code in your ABL code from access (hacking) by unauthorized users.
_extsso authentication system or a user-defined authentication system that is
enabled for SSO-only operations to validate and set a user identity. For all other supported
authentication systems, such as _oeusertable, _oslocal, or user-defined authentication systems that are enabled
for user authentication using an ABL authentication plugin, you can pass an appropriately
initialized unsealed client-principal object directly as input to the SET-CLIENT( ) method
or SET-DB-CLIENT function to authenticate the identity, seal the client-principal object,
create the login session, and set the identity for the ABL session or database connection in
a single user authentication operation.You must validate and set values for the following attributes on the client-principal before you can seal the object with this method:
The AVM raises a run-time error if:
- You do not appropriately set these attributes.
- The client-principal object is already sealed.
- You invoke SEAL() with an encoded domain access code. (You can only call SEAL() with a clear text domain access code.)
You can seal a client-principal object only once per user login session. You can then use the VALIDATE-SEAL( ) method to validate the seal whenever necessary.
Once sealed, you can no longer set any attributes or user-defined properties for the object.
The method also sets the SEAL-TIMESTAMP attribute with the time stamp for
when the client-principal object was sealed, and sets the LOGIN-STATE attribute to "LOGIN".
The method also checks the LOGIN-EXPIRATION-TIMESTAMP attribute. If the client-principal
object expires before you can seal it, the AVM sets the LOGIN-STATE attribute to "EXPIRED" and the method returns FALSE.
Calling this method generates a login audit event and creates an audit record for the event in all connected audit-enabled databases according to each database's current audit policy settings.
The following code fragment illustrates how to use the SEAL( ) method:
|
See also
AUTHENTICATION-FAILED( ) method, LOGIN-EXPIRATION-TIMESTAMP attribute, LOGIN-STATE attribute, LOGOUT( ) method, SEAL-TIMESTAMP attribute, SET-CLIENT( ) method, SET-DB-CLIENT function, VALIDATE-SEAL( ) method