com.sapportals.portal.prt.service.security

Interface ISecurityService

All Superinterfaces:
IService

public interface ISecurityService
extends IService


Field Summary
static String KEY
           
 
Method Summary
 String decryptPassword(String encrypted)
           
 String decryptPassword(String encrypted, String userid)
           
 String encryptPassword(String clear, String userid)
           
 String generateKeyedHash(String text)
           
 String getPassphrase()
           
 Object getSecureStorage()
          Gets a secure storage object.
 String getTicket(String user, int validity, int validity_min)
          gets a ticket signed by the configured keystore.
 byte[] sign(byte[] tbs, long flags)
          Signs the given payload on behalf of the portal.
 Object verify(byte[] tbv, long flags)
          Verifies a piece of data previously signed by a call to sign(byte[], long).
 
Methods inherited from interface com.sapportals.portal.prt.service.IService
afterInit, configure, destroy, getContext, getKey, init, release
 

Field Detail

KEY

static final String KEY
See Also:
Constant Field Values
Method Detail

getSecureStorage

Object getSecureStorage()
Gets a secure storage object.

Returns:
The secure storage object

getTicket

String getTicket(String user,
                 int validity,
                 int validity_min)
gets a ticket signed by the configured keystore. The contents of this ticket will be the user, validity will by validity minutes and validity_min seconds. Callers need the ProtectedCallPermission to invoke this method.

Parameters:
user - User that this ticket is going to be issued for
validity - validity in minutes
validity_min - validity in minutes
Returns:
the ticket string

sign

byte[] sign(byte[] tbs,
            long flags)
Signs the given payload on behalf of the portal. Callers need ProtectedCallPermission to execute this method.

Parameters:
tbs - data to be signed
flags - not yet used, but soon for stuff like detached or not, include certificate, ...
Returns:
DER-encoded PKCS7 object of type SIGNED data

verify

Object verify(byte[] tbv,
              long flags)
              throws GeneralSecurityException
Verifies a piece of data previously signed by a call to sign(byte[], long).

Callers need the ProtectedCallPermission to execute this method.

Parameters:
tbv - the output of a former call to sign
flags - flags indicating various information
Returns:
contained data plus meta-information (signer certificate, timestamp, authenticated attributes, ...
Throws:
GeneralSecurityException

encryptPassword

String encryptPassword(String clear,
                       String userid)

decryptPassword

String decryptPassword(String encrypted,
                       String userid)

decryptPassword

String decryptPassword(String encrypted)

generateKeyedHash

String generateKeyedHash(String text)

getPassphrase

String getPassphrase()
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS [sap.com] tc/epbc/ume/ep5/deprecateddeprecated api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice