Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ This should bring up a grpc server on port **9000** and http server on port **80
policy.attributes.AttributesService.DeactivateAttributeValue
policy.attributes.AttributesService.GetAttribute
policy.attributes.AttributesService.GetAttributeValue
policy.attributes.AttributesService.GetAttributesByValueFqns
policy.attributes.AttributesService.ListAttributeValues
policy.attributes.AttributesService.ListAttributes
policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute
Expand Down
143 changes: 143 additions & 0 deletions docs/grpc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ <h2>Table of Contents</h2>
<a href="#policy.attributes.Attribute"><span class="badge">M</span>Attribute</a>
</li>

<li>
<a href="#policy.attributes.AttributeAndValue"><span class="badge">M</span>AttributeAndValue</a>
</li>

<li>
<a href="#policy.attributes.AttributeCreateUpdate"><span class="badge">M</span>AttributeCreateUpdate</a>
</li>
Expand Down Expand Up @@ -482,6 +486,18 @@ <h2>Table of Contents</h2>
<a href="#policy.attributes.GetAttributeValueResponse"><span class="badge">M</span>GetAttributeValueResponse</a>
</li>

<li>
<a href="#policy.attributes.GetAttributesByValueFqnsRequest"><span class="badge">M</span>GetAttributesByValueFqnsRequest</a>
</li>

<li>
<a href="#policy.attributes.GetAttributesByValueFqnsResponse"><span class="badge">M</span>GetAttributesByValueFqnsResponse</a>
</li>

<li>
<a href="#policy.attributes.GetAttributesByValueFqnsResponse.FqnAttributeValuesEntry"><span class="badge">M</span>GetAttributesByValueFqnsResponse.FqnAttributeValuesEntry</a>
</li>

<li>
<a href="#policy.attributes.ListAttributeValuesRequest"><span class="badge">M</span>ListAttributeValuesRequest</a>
</li>
Expand Down Expand Up @@ -2658,6 +2674,37 @@ <h3 id="policy.attributes.Attribute">Attribute</h3>



<h3 id="policy.attributes.AttributeAndValue">AttributeAndValue</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>attribute</td>
<td><a href="#policy.attributes.Attribute">Attribute</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>value</td>
<td><a href="#policy.attributes.Value">Value</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="policy.attributes.AttributeCreateUpdate">AttributeCreateUpdate</h3>
<p></p>

Expand Down Expand Up @@ -3036,6 +3083,85 @@ <h3 id="policy.attributes.GetAttributeValueResponse">GetAttributeValueResponse</



<h3 id="policy.attributes.GetAttributesByValueFqnsRequest">GetAttributesByValueFqnsRequest</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>fqns</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="policy.attributes.GetAttributesByValueFqnsResponse">GetAttributesByValueFqnsResponse</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>fqn_attribute_values</td>
<td><a href="#policy.attributes.GetAttributesByValueFqnsResponse.FqnAttributeValuesEntry">GetAttributesByValueFqnsResponse.FqnAttributeValuesEntry</a></td>
<td>repeated</td>
<td><p>map of fqns to complete attributes and the one selected value </p></td>
</tr>

</tbody>
</table>





<h3 id="policy.attributes.GetAttributesByValueFqnsResponse.FqnAttributeValuesEntry">GetAttributesByValueFqnsResponse.FqnAttributeValuesEntry</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>value</td>
<td><a href="#policy.attributes.AttributeAndValue">AttributeAndValue</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="policy.attributes.ListAttributeValuesRequest">ListAttributeValuesRequest</h3>
<p></p>

Expand Down Expand Up @@ -3654,6 +3780,13 @@ <h3 id="policy.attributes.AttributesService">AttributesService</h3>
<td><p></p></td>
</tr>

<tr>
<td>GetAttributesByValueFqns</td>
<td><a href="#policy.attributes.GetAttributesByValueFqnsRequest">GetAttributesByValueFqnsRequest</a></td>
<td><a href="#policy.attributes.GetAttributesByValueFqnsResponse">GetAttributesByValueFqnsResponse</a></td>
<td><p></p></td>
</tr>

<tr>
<td>CreateAttribute</td>
<td><a href="#policy.attributes.CreateAttributeRequest">CreateAttributeRequest</a></td>
Expand Down Expand Up @@ -3843,6 +3976,16 @@ <h4>Methods with HTTP bindings</h4>



<tr>
<td>GetAttributesByValueFqns</td>
<td>GET</td>
<td>/attributes/_/fqn</td>
<td></td>
</tr>




<tr>
<td>CreateAttribute</td>
<td>POST</td>
Expand Down
57 changes: 57 additions & 0 deletions docs/openapi/policy/attributes/attributes.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,40 @@
]
}
},
"/attributes/_/fqn": {
"get": {
"operationId": "AttributesService_GetAttributesByValueFqns",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/attributesGetAttributesByValueFqnsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "fqns",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
}
],
"tags": [
"AttributesService"
]
}
},
"/attributes/_/values/{id}": {
"get": {
"summary": "* Attribute Value *",
Expand Down Expand Up @@ -484,6 +518,17 @@
}
}
},
"attributesAttributeAndValue": {
"type": "object",
"properties": {
"attribute": {
"$ref": "#/definitions/attributesAttribute"
},
"value": {
"$ref": "#/definitions/attributesValue"
}
}
},
"attributesAttributeCreateUpdate": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -583,6 +628,18 @@
}
}
},
"attributesGetAttributesByValueFqnsResponse": {
"type": "object",
"properties": {
"fqnAttributeValues": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/attributesAttributeAndValue"
},
"title": "map of fqns to complete attributes and the one selected value"
}
}
},
"attributesListAttributeValuesResponse": {
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions examples/cmd/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func authorizationExamples(examplesConfig *ExampleConfig) error {
}}

// TODO Get attribute value ids
tradeSecretAttributeValueFqn := "https://namespace.com/attr/attr_name/val/replaceme"
openAttributeValueFqn := "https://open.io/attr/attr_name/val/open"
tradeSecretAttributeValueFqn := "https://namespace.com/attr/attr_name/value/replaceme"
openAttributeValueFqn := "https://open.io/attr/attr_name/value/open"

slog.Info("Getting decision for bob and alice for transmit action on resource set with trade secret and resource" +
" set with trade secret + open attribute values")
Expand Down
Loading