eu.emi.security.authn.x509.proxy
Class ProxyPolicy

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Encodable
      extended by eu.emi.security.authn.x509.proxy.ProxyPolicy
All Implemented Interfaces:
Cloneable, DEREncodable

public class ProxyPolicy
extends ASN1Encodable
implements Cloneable

Proxy policy ASN1 class.

 ProxyPolicy ::= SEQUENCE {   policyLanguage OBJECT IDENTIFIER, 
                                policy OCTET STRING OPTIONAL }
 

Author:
Joni Hahkala, K. Benedyczak

Field Summary
static String INDEPENDENT_POLICY_OID
          The rarely used policy where the proxy is independent of the parent and does not inherit rights from it.
static String INHERITALL_POLICY_OID
          The normal, default policy, the proxy inherits the rights of the parent.
static String LIMITED_PROXY_OID
          The limited proxy, which should prevent the proxy from being used for job submission.
 
Fields inherited from class org.bouncycastle.asn1.ASN1Encodable
BER, DER
 
Constructor Summary
ProxyPolicy(ASN1Sequence seq)
          Read a new proxy policy object from the ASN1 sequence.
ProxyPolicy(String oid)
          Generate basic proxy policy.
ProxyPolicy(String oid, ASN1OctetString policy)
          Generate new policy object using language defined by oid and the policy.
 
Method Summary
 ProxyPolicy clone()
           
 ASN1OctetString getPolicyASN1()
          The optional policy information in this structure
 String getPolicyOID()
          Use to get the policy OID as a String.
 DERObject toASN1Object()
          output the ASN1 object of the proxy policy.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INHERITALL_POLICY_OID

public static final String INHERITALL_POLICY_OID
The normal, default policy, the proxy inherits the rights of the parent. Defined in RFC 3820.

See Also:
Constant Field Values

INDEPENDENT_POLICY_OID

public static final String INDEPENDENT_POLICY_OID
The rarely used policy where the proxy is independent of the parent and does not inherit rights from it. Defined in the RFC 3820.

See Also:
Constant Field Values

LIMITED_PROXY_OID

public static final String LIMITED_PROXY_OID
The limited proxy, which should prevent the proxy from being used for job submission. Defined by Globus outside of RFCs.

See Also:
Constant Field Values
Constructor Detail

ProxyPolicy

public ProxyPolicy(String oid)
Generate basic proxy policy.

Parameters:
oid - the policy language or policy to set.

ProxyPolicy

public ProxyPolicy(String oid,
                   ASN1OctetString policy)
Generate new policy object using language defined by oid and the policy.

Parameters:
oid - the OID for the language. Null retains the default of inherit all.
policy - the policy. Null means no policy.

ProxyPolicy

public ProxyPolicy(ASN1Sequence seq)
Read a new proxy policy object from the ASN1 sequence.

Parameters:
seq - The proxy policy ASN1 sequence.
Method Detail

getPolicyOID

public String getPolicyOID()
Use to get the policy OID as a String.

Returns:
The policy OID as a string. It is most likely one of the constants defined in this class, namely:
  • INHERITALL_POLICY_OID
  • INDEPENDENT_POLICY_OID
  • LIMITED_PROXY_OID
  • something else

getPolicyASN1

public ASN1OctetString getPolicyASN1()
The optional policy information in this structure

Returns:
The policy in ASN1 structure. Null if not present.

toASN1Object

public DERObject toASN1Object()
output the ASN1 object of the proxy policy.

Specified by:
toASN1Object in class ASN1Encodable
See Also:
ASN1Encodable.toASN1Object()

clone

public ProxyPolicy clone()
Overrides:
clone in class Object


Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.