Skip to content

Commit

Permalink
New IA - API Version (#5882)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadregoti authored Jan 20, 2025
1 parent 74bfe0d commit 2ec3a59
Show file tree
Hide file tree
Showing 26 changed files with 690 additions and 745 deletions.
2 changes: 0 additions & 2 deletions tyk-docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ enableGitInfo = true
disableKinds = ["term","taxonomy"]
canonifyURLs = false
timeout = "60s"
refLinksErrorLevel = "WARNING"
refLinksNotFoundURL = ""
[params]
GithubEdit = "https://github.com/TykTechnologies/tyk-docs/edit/master/tyk-docs/content/"
GithubReadOnly = "https://github.com/TykTechnologies/tyk-docs/blob/master/tyk-docs/content/"
Expand Down
1 change: 0 additions & 1 deletion tyk-docs/content/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ weight: 60
This section covers less common settings, some of which require custom code. Areas include:

* [Transform Traffic]({{< ref "advanced-configuration/transform-traffic" >}}). How to use request and response headers and bodies, URL rewriting, request method transforms, the validation of JSON, JQ transforms and how to use our API Endpoint Designer.
* [Integration Options]({{< ref "advanced-configuration/integrate" >}}). How you can integrate Tyk with 3rd party providers for plugins, API Authentication, and Single Sign On.
* [Manage Multiple Environments]({{< ref "advanced-configuration/manage-multiple-environments" >}}). How to configure Tyk Multi-Cloud and Self-Managed installations to work with multiple geographically or physically separate installations.
* [WebSockets]({{< ref "advanced-configuration/websockets" >}}). How to use WebSockets connections with Tyk.
* [Log Data]({{< ref "log-data" >}}). How to configure your logs, and 3rd party integration with Sentry, Logstash, Graylog ans Syslog.
Expand Down
16 changes: 0 additions & 16 deletions tyk-docs/content/advanced-configuration/integrate.md

This file was deleted.

10 changes: 0 additions & 10 deletions tyk-docs/content/advanced-configuration/integrate/api-auth-mode.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The **Core Settings** tab provides access to configure basic settings for the AP

{{< img src="/img/dashboard/endpoint-designer/classic-endpoint-designer-versions.png" alt="The Tyk Classic Endpoint Designer - Versions tab" >}}

The **Versions** tab allows you to create and manage [API versioning]({{< ref "getting-started/key-concepts/versioning" >}}) for the API.
The **Versions** tab allows you to create and manage [API versioning]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}}) for the API.

At the top of the Endpoint Designer, you can see which version you are currently editing. If you have more than one option, selecting it from the drop-down will load its endpoint configuration into the editor.

Expand Down
656 changes: 656 additions & 0 deletions tyk-docs/content/api-management/api-versioning.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tyk-docs/content/api-management/automations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3748,11 +3748,11 @@ spec:
```

#### API Versioning
[API versioning]({{<ref "product-stack/tyk-gateway/advanced-configurations/api-versioning/api-versioning">}}) are configured differently for [Tyk OAS APIs]({{< ref "#tyk-oas-api" >}}) and [Tyk Classic APIs]({{< ref "#tyk-classic-api" >}}). Please see below for examples.
[API versioning]({{<ref "api-management/api-versioning">}}) are configured differently for [Tyk OAS APIs]({{< ref "#tyk-oas-api" >}}) and [Tyk Classic APIs]({{< ref "#tyk-classic-api" >}}). Please see below for examples.

##### Configuring API Version in Tyk OAS API Definition

In the [Tyk OAS API Definition]({{<ref "getting-started/key-concepts/oas-versioning#configuring-api-versioning-in-the-tyk-oas-api-definition">}}), versioning can be configured via `x-tyk-api-gateway.versioning` object of the Base API, where the child API's IDs are specified. In the Kubernetes environment with Tyk Operator, where we reference API resources through its Kubernetes name and namespace, this is not desired. Therefore, we add support for versioning configurations through the field `versioning` in `TykOasApiDefinition` custom resource definition (CRD).
In the [Tyk OAS API Definition]({{<ref "api-management/api-versioning#configuring-api-versioning-in-the-tyk-oas-api-definition">}}), versioning can be configured via `x-tyk-api-gateway.versioning` object of the Base API, where the child API's IDs are specified. In the Kubernetes environment with Tyk Operator, where we reference API resources through its Kubernetes name and namespace, this is not desired. Therefore, we add support for versioning configurations through the field `versioning` in `TykOasApiDefinition` custom resource definition (CRD).

Here's an example:

Expand Down Expand Up @@ -3797,7 +3797,7 @@ spec:

In this example, two different versions of an API are defined: `order-api` (v1) and `order-api-v2` (v2).

`versioning` is configured at `order-api` (v1), the Base API, and it has similiar structure as [Tyk OAS API Definition]({{<ref "getting-started/key-concepts/oas-versioning#configuring-api-versioning-in-the-tyk-oas-api-definition">}}):
`versioning` is configured at `order-api` (v1), the Base API, and it has similiar structure as [Tyk OAS API Definition]({{<ref "api-management/api-versioning#configuring-api-versioning-in-the-tyk-oas-api-definition">}}):

- `versioning`: This object configures API versioning for the `order-api`.
- `enabled`: Set to true to enable versioning.
Expand Down Expand Up @@ -3828,7 +3828,7 @@ As of Tyk Operator v1.1, API versioning is not supported in `TykStreamsApiDefini

##### Configuring API Version in Tyk Classic API Definition

For Tyk Classic API, versioning can be configured via `ApiDefinition` custom resource definition (CRD). See [Tyk Classic versioning]({{<ref "getting-started/key-concepts/versioning">}}) for a comprehensive example of configuring API versioning for Tyk Classic API with Tyk Operator.
For Tyk Classic API, versioning can be configured via `ApiDefinition` custom resource definition (CRD). See [Tyk Classic versioning]({{<ref "api-management/api-versioning#tyk-classic-api-versioning-1">}}) for a comprehensive example of configuring API versioning for Tyk Classic API with Tyk Operator.

#### API Ownership

Expand Down Expand Up @@ -4630,7 +4630,7 @@ which version of Kubernetes it is tested against.


#### Security Policy CRD
The SecurityPolicy custom resource defines configuration of [Tyk Security Policy object]({{<ref "basic-config-and-security/security/security-policies">}}).
The SecurityPolicy custom resource defines configuration of [Tyk Security Policy object]({{<ref "api-management/policies">}}).

Here are the supported features:

Expand Down
2 changes: 1 addition & 1 deletion tyk-docs/content/api-management/client-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,6 @@ If you want the key to be deleted when it expires (i.e. to use the expiry config
Securing your APIs is a foundational step toward managing data integrity and access control effectively. Now that you've configured authentication and authorization, the next steps in your API journey with Tyk should involve:
Defining Access Policies: Use Tyk’s policies to refine API access controls, rate limits, and quotas. This lets you align your security model with business needs and enhance user experience through granular permissions. You can learn more about policies [here](/basic-config-and-security/security/security-policies/).
Defining Access Policies: Use Tyk’s policies to refine API access controls, rate limits, and quotas. This lets you align your security model with business needs and enhance user experience through granular permissions. You can learn more about policies [here](/api-management/policies/).
Exploring API Analytics: Leverage Tyk’s analytics to monitor access patterns, track usage, and gain insights into potential security risks or high-demand endpoints. Understanding usage data can help in optimizing API performance and enhancing security measures. You can learn more about analytics [here](/tyk-dashboard-analytics/).
12 changes: 6 additions & 6 deletions tyk-docs/content/api-management/security-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ The Ops team should also take reponsibility for monitoring the APIs for errors a

Tyk offers the following features to support improper inventory management:

- [Versioning]({{< ref "getting-started/key-concepts/versioning" >}}) allows newer versions of APIs to coexist with the older versions, facilitating deprecation and sunsetting.
- [Sunsetting]({{< ref "product-stack/tyk-gateway/advanced-configurations/api-versioning/api-versioning#sunsetting-api-versions" >}}) allows versions to be configured with an Expiry Time, ensuring that a version is not accessible after the expiry date.
- [Versioning]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}}) allows newer versions of APIs to coexist with the older versions, facilitating deprecation and sunsetting.
- [Sunsetting]({{< ref "api-management/api-versioning#sunsetting-api-versions" >}}) allows versions to be configured with an Expiry Time, ensuring that a version is not accessible after the expiry date.
- [Key expiry]({{< ref "api-management/policies#access-key-expiry" >}}) ensures that access to an API is short lived, with a per key configurable Time to Live (TTL) for which a token remains valid before it expires. The implementation of key expiry, with a configurable Time To Live (TTL), mitigates the impact of compromised tokens by narrowing the window of vulnerability. Setting a TTL reduces the time frame during which a compromised token could be exploited, enhancing overall security.
- Tyk Developer Portal catalogs APIs and facilitates granting access to them. Integrated with a CMDB it can help keep documentation updated.
- [Tyk Analytics]({{< ref "tyk-dashboard-analytics" >}}) can help identify the stagnant APIs and used stale APIs.
Expand All @@ -143,8 +143,8 @@ Attackers may identify and target the third party APIs/services used by an API.
It is the responsibility of the API to provide protection against these attacks. However, if the organization uses the Gateway as a forwarding proxy to third party APIs, then the following features could be used:

- [JSON Schema validation]({{< ref "product-stack/tyk-gateway/middleware/validate-request-tyk-classic" >}}) to validate that an incoming data payload meets a defined schema. Payloads that do not adhere to the schema are rejected.
- [Versioning]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}}) allows newer versions of third party APIs to coexist with the older versions, facilitating deprecation and sunsetting.
- [TLS]({{< ref "api-management/certificates" >}}) to ensure that clients use the right service and encrypt traffic.
- [Versioning]({{< ref "getting-started/key-concepts/versioning" >}}) allows newer versions of third party APIs to coexist with the older versions, facilitating deprecation and sunsetting.


## Managing Authentication and Authorization
Expand Down Expand Up @@ -196,7 +196,7 @@ For GraphQL APIs, use the gateway to define [GraphQL schemas]({{< ref "graphql-p

##### Function Level Authorization

Handle with the gateway. Use [security policies]({{< ref "basic-config-and-security/security/security-policies" >}}), [path-based permissions]({{< ref "api-management/policies#secure-your-apis-by-method-and-path" >}}), [allow lists]({{< ref "product-stack/tyk-gateway/middleware/allow-list-tyk-oas#configuring-the-allow-list-in-the-tyk-oas-api-definition" >}}) and [block lists]({{< ref "product-stack/tyk-gateway/middleware/block-list-tyk-oas#configuring-the-block-list-in-the-api-designer" >}}) to manage authorization of hosts and paths.
Handle with the gateway. Use [security policies]({{< ref "api-management/policies" >}}), [path-based permissions]({{< ref "api-management/policies#secure-your-apis-by-method-and-path" >}}), [allow lists]({{< ref "product-stack/tyk-gateway/middleware/allow-list-tyk-oas#configuring-the-allow-list-in-the-tyk-oas-api-definition" >}}) and [block lists]({{< ref "product-stack/tyk-gateway/middleware/block-list-tyk-oas#configuring-the-block-list-in-the-api-designer" >}}) to manage authorization of hosts and paths.

#### Assign Least Privileges

Expand Down Expand Up @@ -347,7 +347,7 @@ Modify or remove sensitive data from responses by using [transforms]({{< ref "ad

APIs need to be managed and governed just like any other resource, otherwise organizations risk losing track of their API estate and becoming unaware of potentially vulnerable APIs running within their infrastructure. This risk is magnified as the number of teams, environments and APIs increases. Use API management as part of overarching business processes to control how APIs are accessed, managed and deployed.

**Restrict Version Availability**: Enforce the expiry of [API versions]({{< ref "getting-started/key-concepts/versioning" >}}) that are planned for deprecation, by setting a sunset date, beyond which they will not be accessible.
**Restrict Version Availability**: Enforce the expiry of [API versions]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}}) that are planned for deprecation, by setting a sunset date, beyond which they will not be accessible.

**Enforce Key Expiry**: In many situations it’s best to issue API keys that have a short, finite lifetime, especially when serving anonymous, external consumers. Set [expiry dates]({{< ref "api-management/policies#access-key-expiry" >}}) for API keys, or use ephemeral credentials with complementary authentication techniques that support key renewal, such as [OAuth 2.0 refresh tokens]({{< ref "/api-management/client-authentication#using-refresh-tokens" >}}) and [dynamic client registration]({{< ref "tyk-stack/tyk-developer-portal/enterprise-developer-portal/api-access/dynamic-client-registration" >}}). Then, should an API key fall into the wrong hands, there’s a chance that it has already expired.

Expand Down Expand Up @@ -404,4 +404,4 @@ See [Authentication and Authorization]({{< ref "/api-management/client-authentic

A Tyk security policy incorporates several security options that can be applied to an API key. These include [Partioned Policies]({{< ref "api-management/policies#partitioned-policies" >}}) and securing by [Method and Path]({{< ref "api-management/policies#secure-your-apis-by-method-and-path" >}}).

See [Security Policies]({{< ref "basic-config-and-security/security/security-policies" >}}) for more details.
See [Security Policies]({{< ref "api-management/policies" >}}) for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Check out the following video to see this being done.

## Configuring the rate limiter at the Key-Level

If you want to restrict an API client to a certain rate of requests to your APIs, you can configure a Key-Level rate limit via a [Security Policy]({{< ref "basic-config-and-security/security/security-policies" >}}). The allowance that you configure in the policy will be consumed by any requests made to APIs using a key generated from the policy. Thus, if a policy grants access to three APIs with `rate=15 per=60` then a client using a key generated from that policy will be able to make a total of 15 requests - to any combination of those APIs - in any 60 second period before receiving the `HTTP 429 Too Many Requests` error.
If you want to restrict an API client to a certain rate of requests to your APIs, you can configure a Key-Level rate limit via a [Security Policy]({{< ref "api-management/policies" >}}). The allowance that you configure in the policy will be consumed by any requests made to APIs using a key generated from the policy. Thus, if a policy grants access to three APIs with `rate=15 per=60` then a client using a key generated from that policy will be able to make a total of 15 requests - to any combination of those APIs - in any 60 second period before receiving the `HTTP 429 Too Many Requests` error.

{{< note success >}}
**Note**
Expand Down
4 changes: 2 additions & 2 deletions tyk-docs/content/developer-support/release-notes/archived.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ You can now specify a default API version, and it will be used if a version is n

`spec.version_data.default_version`

[Docs]({{< ref "getting-started/key-concepts/versioning" >}})
[Docs]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}})

#### Disable URL Encoding

Expand Down Expand Up @@ -991,7 +991,7 @@ If no user agent is specified in a request, it is now set as `Tyk/$VERSION`.
#### Include `x-tyk-api-expires` date header for versioned APIs
If a request is made for an API which has an expiry date, the response will include the `x-tyk-api-expires` header with expiry date.

[Docs]({{< ref "getting-started/key-concepts/versioning" >}})
[Docs]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}})

#### Run Admin Control API on a separate port
Using `control_api_port` option in configuration file, you can run the admin control api on a separate port, and hide it behind firewall if needed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3528,7 +3528,7 @@ For a comprehensive list of changes, please refer to the detailed [changelog]({{
Tyk Dashboard has been enhanced with **all the custom middleware options** for Tyk OAS APIs, so **for the first time** you can configure your custom middleware from the Dashboard; this covers the full suite of custom middleware from pre- to post- and response plugins. We’ve got support for middleware bundles, Go plugins and Tyk Virtual Endpoints, all within the new and improved Tyk Dashboard UI.
[Versioning your Tyk OAS APIs]({{< ref "getting-started/key-concepts/oas-versioning" >}}) is easier than ever, with the Tyk OSS Gateway now looking after the maintenance of the list of versions associated with the base API for you; we’ve also added a new endpoint on the Tyk API that will return details of the versions for a given API.
[Versioning your Tyk OAS APIs]({{< ref "api-management/api-versioning#tyk-oas-api-versioning-1" >}}) is easier than ever, with the Tyk OSS Gateway now looking after the maintenance of the list of versions associated with the base API for you; we’ve also added a new endpoint on the Tyk API that will return details of the versions for a given API.
Tyk Dashboard hasn’t been left out, we’ve implemented a brand new version management UI for Tyk OAS APIs, to make it as easy as possible for you to manage those API versions as you develop and extend your API products with Tyk.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4560,7 +4560,7 @@ APIs, to transform API requests and responses, exposing your upstream services i
internal API governance rules. We’ve enhanced the Request Validation for Tyk OAS APIs to include parameter validation
(path, query, headers, cookie) as well as the body validation that was introduced in Tyk 4.1.
[Versioning your Tyk OAS APIs]({{< ref "getting-started/key-concepts/oas-versioning" >}}) is easier than ever, with the
[Versioning your Tyk OAS APIs]({{< ref "api-management/api-versioning#tyk-oas-api-versioning-1" >}}) is easier than ever, with the
Tyk OSS Gateway now looking after the maintenance of the list of versions associated with the base API for you; we’ve
also added a new endpoint on the Tyk API that will return details of the versions for a given API.
Expand Down
2 changes: 1 addition & 1 deletion tyk-docs/content/getting-started/import-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Tyk supports API mocking using our versioning `use_extended_paths` setup, adding
],
```

See [Versioning]({{< ref "getting-started/key-concepts/versioning" >}}) for more details.
See [Versioning]({{< ref "api-management/api-versioning#tyk-classic-api-versioning-1" >}}) for more details.

### Import APIs via the Dashboard API

Expand Down
Loading

0 comments on commit 2ec3a59

Please sign in to comment.