Policy Configuration API
{ urn:com.akana.policy.config.api } PolicyConfigurationAPI
The Policy Configuration API allows policies to be configured through the exchange of metadata and .
GET/policies/configGet Available Policy Configurations
Fetch a summary of all available policy configurations for a specific organization/tenant.
Response
{
"links": [
{
"rel": "self",
"href": "http://localhost:9900/api/policies/config/"
}
],
"policies": [
{
"name": "SeedServiceBindingPolicy",
"key": "SeedServiceBindingPolicy",
"version": "1",
"links": [
{
"rel": "self",
"href": "http://localhost:9900/api/policies/config/SeedServiceBindingPolicy"
},
{
"rel": "actions",
"href": "http://localhost:9900/api/policies/config/SeedServiceBindingPolicy/actions"
},
{
"rel": "next",
"href": "http://localhost:9900/api/policies/config/SeedServiceBindingPolicy/actions/asymmetric.binding.action"
}
],
"policyType": "policy.security.asym"
},
{
"name": "SampleWSSecurityAsymmetricBindingPolicy",
"key": "urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480",
"version": "2",
"links": [
{
"rel": "self",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480"
},
{
"rel": "actions",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions"
},
{
"rel": "next",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions/asymmetric.binding.action"
}
],
"policyType": "policy.security.asym"
}
]
}
Parameters
Name
Type
Description
Model
BusinessID
query
The unique ID for a specific business on the platform. If this parameter is included, only policies relating to the specified business are returned.
string
Reponse
Produces application/jsonapplication/xml
Status Code
Reason
Model
200
Success
policyConfigurationSet
policyConfigurationSet {
policyConfiguration {
atomLink {
actionInfo {
Requirement {
policies( Collection of policyConfiguration )
links( Collection of atomLink )
}
policyConfiguration {
presentationName( string )
name( string )
description( string )
links( Collection of atomLink )
assertions( Collection of actionInfo )
type( string )
version( string )
key( string )
}
atomLink {
hreflang( string )
length( string )
rel( string )
href( anyURI )
title( string )
type( string )
lang( string )
base( anyURI )
}
actionInfo {
schema( anyType )
presentationName( string )
data( anyType )
name( string )
options( anyType )
description( string )
links( Collection of atomLink )
requires( Collection of Requirement )
}
Requirement {
name( string )
value( anyType )
}
GET/policies/config/{key}Retrieve the Configuration for a Specific Policy
Get details for a specific policy configuration.
Response
{
"name": "SampleWSSecurityAsymmetricBindingPolicy",
"key": "urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480",
"version": "2",
"links": [
{
"rel": "self",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480"
},
{
"rel": "actions",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions"
},
{
"rel": "next",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions/asymmetric.binding.action"
}
],
"policyType": "policy.security.asym"
}
Parameters
Name
Type
Description
Model
key
path
string
version
query
string
assertions
query
boolean
Reponse
Produces application/jsonapplication/xml
Status Code
Reason
Model
200
Success
policyConfiguration
policyConfiguration {
atomLink {
actionInfo {
Requirement {
presentationName( string )
name( string )
description( string )
links( Collection of atomLink )
assertions( Collection of actionInfo )
type( string )
version( string )
key( string )
}
atomLink {
hreflang( string )
length( string )
rel( string )
href( anyURI )
title( string )
type( string )
lang( string )
base( anyURI )
}
actionInfo {
schema( anyType )
presentationName( string )
data( anyType )
name( string )
options( anyType )
description( string )
links( Collection of atomLink )
requires( Collection of Requirement )
}
Requirement {
name( string )
value( anyType )
}
GET/policies/config/{key}/actionsGet Actions for a configuration
Fetch all of the available actions for a given policy.
Parameters
Name
Type
Description
Model
key
path
The policy key.
string
version
query
string
Reponse
Produces application/json
Status Code
Reason
Model
200
Success
actionSet
actionSet {
atomLink {
actionInfo {
Requirement {
links( Collection of atomLink )
actions( Collection of actionInfo )
}
atomLink {
hreflang( string )
length( string )
rel( string )
href( anyURI )
title( string )
type( string )
lang( string )
base( anyURI )
}
actionInfo {
schema( anyType )
presentationName( string )
data( anyType )
name( string )
options( anyType )
description( string )
links( Collection of atomLink )
requires( Collection of Requirement )
}
Requirement {
name( string )
value( anyType )
}
GET/policies/config/{key}/actions/{action}Get Action Detail
Get detailed information for a particular configuration action, and optional version.
Request
GET /api/policies/config/{policyKey}/actions/{actionId}?version={version} HTTP/1.1
Host: localhost:9900
Response
{
"name": "asymmetric.binding.action",
"presentationName": "Asymmetric Binding Options",
"description": "<p>The \"Specify Asymmetric Binding Options\" ... </p>",
"schema": {
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"properties": {
"encryptBeforeSigning": {
"title": "Encrypt Before Signing",
"type": "boolean"
},
"encryptSignature": {
"title": "Encrypt Signature",
"type": "boolean"
},
"headerLayout": {
"title": "Security Header Layout",
"enum": [
"STRICT",
"LAX",
"LAX_TIMESTAMP_FIRST",
"LAX_TIMESTAMP_LAST"
]
},
"includeTimestamp": {
"title": "Include Timestamp",
"type": "boolean"
},
"onlySignEntire": {
"title": "Only Sign Entire Headers and Body",
"type": "boolean"
},
"protectTokens": {
"title": "Protect Tokens",
"type": "boolean"
},
"securityPolicyVersion": {
"title": "WS-SecurityPolicy Version",
"enum": [
"VERSION_11",
"VERSION_12"
]
}
},
"required": [
"headerLayout",
"securityPolicyVersion"
]
},
"links": [
{
"rel": "self",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions/asymmetric.binding.action"
},
{
"rel": "execute",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions/asymmetric.binding.action/execute"
},
{
"rel": "finish",
"href": "http://localhost:9900/api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions/asymmetric.binding.action/execute?action=finish"
}
],
"data": {
"includeTimestamp": true,
"encryptSignature": false,
"securityPolicyVersion": "VERSION_11",
"headerLayout": "LAX",
"protectTokens": false,
"onlySignEntire": true,
"encryptBeforeSigning": false
},
"options": {
"fields": {
"protectTokens": {
"order": "6"
},
"encryptBeforeSigning": {
"order": "4"
},
"headerLayout": {
"optionLabels": [
"Strict",
"Lax",
"Lax Timestamp First",
"Lax Timestamp Last"
],
"type": "select",
"order": "2"
},
"onlySignEntire": {
"order": "7"
},
"securityPolicyVersion": {
"optionLabels": [
"Version 1.1",
"Version 1.2"
],
"type": "select",
"order": "1"
},
"includeTimestamp": {
"order": "3"
},
"encryptSignature": {
"order": "5"
}
}
}
}
Parameters
Name
Type
Description
Model
key
path
The policy key.
string
action
path
The action id.
string
version
query
string
Reponse
Produces application/json
Status Code
Reason
Model
200
Success
actionInfo
actionInfo {
atomLink {
Requirement {
schema( anyType )
presentationName( string )
data( anyType )
name( string )
options( anyType )
description( string )
links( Collection of atomLink )
requires( Collection of Requirement )
}
atomLink {
hreflang( string )
length( string )
rel( string )
href( anyURI )
title( string )
type( string )
lang( string )
base( anyURI )
}
Requirement {
name( string )
value( anyType )
}
POST/policies/config/{key}/actions/{action}/executeExecute Action
Execute an action. This operation is invoked if the content type is application/json. The content must conform to the schema provided by the action descriptor.
Request
POST /api/policies/config/urn:uuid:ab2084c1-e3b9-11e8-8956-e0932b35f480/actions/asymmetric.binding.action/execute HTTP/1.1
Content-Type: application/json
Host: localhost:9900
{
"includeTimestamp": true,
"encryptSignature": true,
"securityPolicyVersion": "VERSION_11",
"headerLayout": "LAX",
"protectTokens": false,
"onlySignEntire": true,
"encryptBeforeSigning": false
}
Parameters
Accepts application/json
Name
Type
Description
Model
key
path
The policy key.
string
action
path
The name of the step to execute.
string
version
query
string
body
entity
The action to execute, along with any history.
Reponse
Produces application/json
Status Code
Reason
Model
200
Success
executionStatus
executionStatus {
actionInfo {
atomLink {
Requirement {
fieldError {
policyConfigurationStatus {
next( actionInfo )
data( anyType )
start( dateTime )
progress( int )
end( dateTime )
links( Collection of atomLink )
history( Collection of actionInfo )
errors( Collection of fieldError )
status( policyConfigurationStatus )
}
actionInfo {
schema( anyType )
presentationName( string )
data( anyType )
name( string )
options( anyType )
description( string )
links( Collection of atomLink )
requires( Collection of Requirement )
}
atomLink {
hreflang( string )
length( string )
rel( string )
href( anyURI )
title( string )
type( string )
lang( string )
base( anyURI )
}
Requirement {
name( string )
value( anyType )
}
fieldError {
field( string )
message( string )
type( errorType )
}
policyConfigurationStatus {
state( state )
detail( string )
}