xacml

package module
v0.0.0-...-bbc4529 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2015 License: MIT Imports: 8 Imported by: 0

README

xacml

A go xacml library

Documentation

Index

Constants

View Source
const (
	PolicyCombiningAlgorithmDenyOverrides          = "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides"
	PolicyCombiningAlgorithmPermitOverrides        = "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-overrides"
	PolicyCombiningAlgorithmOrderedDenyOverrides   = "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-deny-overrides"
	PolicyCombiningAlgorithmOrderedPermitOverrides = "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-permit-overrides"
	PolicyCombiningAlgorithmDenyUnlessPermit       = "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit"
	PolicyCombiningAlgorithmPermitUnlessDeny       = "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny"

	PolicyCombiningAlgorithmFirstApplicable   = "urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:first-applicable"
	PolicyCombiningAlgorithmOnlyOneApplicable = "urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:only-one-applicable"

	RuleCombiningAlgorithmDenyOverrides          = "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides"
	RuleCombiningAlgorithmPermitOverrides        = "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides"
	RuleCombiningAlgorithmOrderedDenyOverrides   = "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-deny-overrides"
	RuleCombiningAlgorithmOrderedPermitOverrides = "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-permit-overrides"
	RuleCombiningAlgorithmDenyUnlessPermit       = "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit"
	RuleCombiningAlgorithmPermitUnlessDeny       = "urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny"

	RuleCombiningAlgorithmFirstApplicable = "urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"
)
View Source
const (
	ConditionTrue          = "True"
	ConditionFalse         = "False"
	ConditionIndeterminate = "Indeterminate"
)
View Source
const (
	ResultPermit        = "Permit"
	ResultDeny          = "Deny"
	ResultNotApplicable = "NotApplicable"
	ResultIndeterminate = "Indeterminate"
)
View Source
const (
	AttributeCategorySubjectAccessSubject       = "urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
	AttributeCategorySubjectCodebase            = "urn:oasis:names:tc:xacml:1.0:subject-category:codebase"
	AttributeCategorySubjectIntermediarySubject = "urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject"
	AttributeCategorySubjectRecipientSubject    = "urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject"
	AttributeCategorySubjectRequestingMachine   = "urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine"
	AttributeCategoryResource                   = "urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
	AttributeCategoryAction                     = "urn:oasis:names:tc:xacml:3.0:attribute-category:action"
	AttributeCategoryEnvironment                = "urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
	IdentifierSubjectAuthNLocalityDNSName       = "urn:oasis:names:tc:xacml:1.0:subject:authn-locality:dns-name"
	IdentifierSubjectAuthNLocalityIPAddress     = "urn:oasis:names:tc:xacml:1.0:subject:authn-locality:ip-address"
	IdentifierSubjectAuthenticationMethod       = "urn:oasis:names:tc:xacml:1.0:subject:authentication-method"
	IdentifierSubjectAuthenticationTime         = "urn:oasis:names:tc:xacml:1.0:subject:authentication-time"
	IdentifierSubjectKeyInfo                    = "urn:oasis:names:tc:xacml:1.0:subject:key-info"
	IdentifierSubjectRequestTime                = "urn:oasis:names:tc:xacml:1.0:subject:request-time"
	IdentifierSubjectSessionStartTime           = "urn:oasis:names:tc:xacml:1.0:subject:session-start-time"
	IdentifierSubjectId                         = "urn:oasis:names:tc:xacml:1.0:subject:subject-id"
	IdentifierSubjectIdQualifier                = "urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier"
	IdentifierResourceLocation                  = "urn:oasis:names:tc:xacml:1.0:resource:resource-location"
	IdentifierResourceId                        = "urn:oasis:names:tc:xacml:1.0:resource:resource-id"
	IdentifierResourceSimpleFileName            = "urn:oasis:names:tc:xacml:1.0:resource:simple-file-name"
	IdentifierActionId                          = "urn:oasis:names:tc:xacml:1.0:action:action-id"
	IdentifierActionImpliedAction               = "urn:oasis:names:tc:xacml:1.0:action:implied-action"
	IdentifierEnvironmentCurrentTime            = "urn:oasis:names:tc:xacml:1.0:environment:current-time"
	IdentifierEnvironmentCurrentDate            = "urn:oasis:names:tc:xacml:1.0:environment:current-date"
	IdentifierEnvironmentCurrentDateTime        = "urn:oasis:names:tc:xacml:1.0:environment:current-dateTime"
)
View Source
const (
	ResponseDeny            = "Deny"
	ResponsePermit          = "Permit"
	ResponseNotApplicable   = "Not Applicable"
	ResponseIndeterminate   = "Indeterminate"
	ResponseIndeterminateD  = "Indeterminate{D}"
	ResponseIndeterminateP  = "Indeterminate{P}"
	ResponseIndeterminateDP = "Indeterminate{DP}"
)
View Source
const (
	DataTypeString            = "http://www.w3.org/2001/XMLSchema#string"
	DataTypeBoolean           = "http://www.w3.org/2001/XMLSchema#boolean"
	DataTypeInteger           = "http://www.w3.org/2001/XMLSchema#integer"
	DataTypeDouble            = "http://www.w3.org/2001/XMLSchema#double"
	DataTypeTime              = "http://www.w3.org/2001/XMLSchema#time"
	DataTypeDate              = "http://www.w3.org/2001/XMLSchema#date"
	DataTypeDateTime          = "http://www.w3.org/2001/XMLSchema#dateTime"
	DataTypeDayTimeDuration   = "http://www.w3.org/2001/XMLSchema#dayTimeDuration"
	DataTypeYearMonthDuration = "http://www.w3.org/2001/XMLSchema#yearMonthDuration"
	DataTypeAnyURI            = "http://www.w3.org/2001/XMLSchema#anyURI"
	DataTypeHexBinary         = "http://www.w3.org/2001/XMLSchema#hexBinary"
	DataTypeBase64Binary      = "http://www.w3.org/2001/XMLSchema#base64Binary"
	DataTypeRFC822Name        = "urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name"
	DataTypeX500Name          = "urn:oasis:names:tc:xacml:1.0:data-type:x500Name"
	DataTypeXPathExpression   = "urn:oasis:names:tc:xacml:3.0:data-type:xpathExpression"
	DataTypeIPAddress         = "urn:oasis:names:tc:xacml:2.0:data-type:ipAddress"
	DataTypeDNSName           = "urn:oasis:names:tc:xacml:2.0:data-type:dnsName"
)

Variables

This section is empty.

Functions

func GetResultFromResponse

func GetResultFromResponse(responseXML string) (string, error)

func PolicyDecisionPoint

func PolicyDecisionPoint(policy string, request string) (string, error)

Types

type Policy

type Policy struct {
	// contains filtered or unexported fields
}

func (Policy) Evaluate

func (policy Policy) Evaluate(request Request) Response

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest() Request

func (Request) AddAttribute

func (request Request) AddAttribute(category, attributeId, dataType, value string)

func (Request) AddAttributeBag

func (request Request) AddAttributeBag(category, attributeId, dataType string, values []string)

func (Request) GetAttribute

func (request Request) GetAttribute(category, attributeId, attributeDataType string, mustBePresent bool) (interface{}, error)

func (Request) Xml

func (request Request) Xml() string

type Response

type Response struct {
	// contains filtered or unexported fields
}

func (Response) AddResult

func (response Response) AddResult(result, status string)

func (Response) GetResult

func (response Response) GetResult() (string, string)

func (Response) Xml

func (response Response) Xml() string

type Rule

type Rule struct {
	// contains filtered or unexported fields
}

func (Rule) Evaluate

func (rule Rule) Evaluate(request Request) Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL