istio.io/content/en/docs/reference/config/policy-and-telemetry/templates/apikey/index.html

104 lines
2.2 KiB
HTML

---
WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL SOURCE IN THE 'https://github.com/istio/istio' REPO
source_repo: https://github.com/istio/istio
title: API Key
description: A template that represents a single API key.
location: https://istio.io/docs/reference/config/policy-and-telemetry/templates/apikey.html
layout: protoc-gen-docs
generator: protoc-gen-docs
aliases:
- /docs/reference/config/template/apikey.html
number_of_entries: 1
---
<p>The <code>apikey</code> template represents a single API key, which is used for authorization checks.</p>
<p>Example config:</p>
<pre><code class="language-yaml">apiVersion: &quot;config.istio.io/v1alpha2&quot;
kind: instance
metadata:
name: validate-apikey
namespace: istio-system
spec:
compiledTemplate: apikey
params:
api: api.service | &quot;&quot;
api_version: api.version | &quot;&quot;
api_operation: api.operation | &quot;&quot;
api_key: api.key | &quot;&quot;
timestamp: request.time
</code></pre>
<h2 id="Template">Template</h2>
<section>
<p>The <code>apikey</code> template represents a single API key, used to authorize API calls.</p>
<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
</tr>
</thead>
<tbody>
<tr id="Template-api">
<td><code>api</code></td>
<td><code>string</code></td>
<td>
<p>The API being called (api.service).</p>
</td>
<td>
No
</td>
</tr>
<tr id="Template-api_version">
<td><code>apiVersion</code></td>
<td><code>string</code></td>
<td>
<p>The version of the API (api.version).</p>
</td>
<td>
No
</td>
</tr>
<tr id="Template-api_operation">
<td><code>apiOperation</code></td>
<td><code>string</code></td>
<td>
<p>The API operation is being called.</p>
</td>
<td>
No
</td>
</tr>
<tr id="Template-api_key">
<td><code>apiKey</code></td>
<td><code>string</code></td>
<td>
<p>API key used in API call.</p>
</td>
<td>
No
</td>
</tr>
<tr id="Template-timestamp">
<td><code>timestamp</code></td>
<td><code><a href="/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1.html#TimeStamp">istio.policy.v1beta1.TimeStamp</a></code></td>
<td>
<p>Timestamp of API call.</p>
</td>
<td>
No
</td>
</tr>
</tbody>
</table>
</section>