1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-04 13:48:56 +02:00

feat: rebrand sdk tokens and sdk types (#10430)

## About the changes
Rebrand SDK tokens and SDK types to make it easier to onboard and use:

**Backend SDK Token**: Intended for server-side SDKs. It can be used to
access:

- The Client Features API (/api/client/features) for fetching all flag
configurations for local evaluation.
- The Frontend API (/api/frontend) for remote evaluation.

**Frontend SDK Token**: Intended for client-side/frontend SDKs. It is
restricted and can only be used to access:

- The Frontend API (/api/frontend) for remote evaluation.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
This commit is contained in:
Gastón Fournier 2025-07-30 10:24:40 +02:00 committed by GitHub
parent 3479aa8b2c
commit 0f565c50e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 28 additions and 29 deletions

View File

@ -58,10 +58,10 @@ Find your preferred SDK in [our list of official SDKs](#unleash-sdks) and import
If you use the docker compose file from the previous step, here's the configuration details you'll need to get going: If you use the docker compose file from the previous step, here's the configuration details you'll need to get going:
- For front-end SDKs, use: - For frontend SDKs, use:
- URL: `http://localhost:4242/api/frontend/` - URL: `http://localhost:4242/api/frontend/`
- `clientKey`: `default:development.unleash-insecure-frontend-api-token` - `clientKey`: `default:development.unleash-insecure-frontend-api-token`
- For server-side SDKs, use: - For backend SDKs, use:
- Unleash API URL: `http://localhost:4242/api/` - Unleash API URL: `http://localhost:4242/api/`
- API token: `default:development.unleash-insecure-api-token` - API token: `default:development.unleash-insecure-api-token`
@ -145,7 +145,7 @@ Check out [the CONTRIBUTING.md file](./CONTRIBUTING.md) for contribution guideli
- Out-of-the-box integrations with popular tools ([Slack](https://docs.getunleash.io/addons/slack), [Microsoft Teams](https://docs.getunleash.io/addons/teams), [Datadog](https://docs.getunleash.io/addons/datadog)) + integrate with anything with [webhooks](https://docs.getunleash.io/addons/webhook) - Out-of-the-box integrations with popular tools ([Slack](https://docs.getunleash.io/addons/slack), [Microsoft Teams](https://docs.getunleash.io/addons/teams), [Datadog](https://docs.getunleash.io/addons/datadog)) + integrate with anything with [webhooks](https://docs.getunleash.io/addons/webhook)
- [Insights for managing technical debt](https://docs.getunleash.io/reference/technical-debt) and [stale flags](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-flags) - [Insights for managing technical debt](https://docs.getunleash.io/reference/technical-debt) and [stale flags](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-flags)
- API-first: _everything_ can be automated. No exceptions. - API-first: _everything_ can be automated. No exceptions.
- [12 official client SDKs](https://docs.getunleash.io/reference/sdks#official-sdks), and 10 [community-contributed client SDKs](https://docs.getunleash.io/reference/sdks#community-sdks) - [12 official SDKs](https://docs.getunleash.io/reference/sdks#official-sdks), and 10 [community-contributed SDKs](https://docs.getunleash.io/reference/sdks#community-sdks)
- Run it via Docker with the [official Docker image](https://hub.docker.com/r/unleashorg/unleash-server) or as a pure Node.js application - Run it via Docker with the [official Docker image](https://hub.docker.com/r/unleashorg/unleash-server) or as a pure Node.js application
### Security and performance ### Security and performance
@ -154,7 +154,7 @@ Check out [the CONTRIBUTING.md file](./CONTRIBUTING.md) for contribution guideli
- [Audit logs](https://docs.getunleash.io/advanced/audit_log) - [Audit logs](https://docs.getunleash.io/advanced/audit_log)
- Enforce [OWASP's secure headers](https://owasp.org/www-project-secure-headers/) via the strict HTTPS-only mode - Enforce [OWASP's secure headers](https://owasp.org/www-project-secure-headers/) via the strict HTTPS-only mode
- Flexible hosting options: host it on premise or in the cloud (_any_ cloud) - Flexible hosting options: host it on premise or in the cloud (_any_ cloud)
- Scale with [Unleash Edge](https://docs.getunleash.io/reference/unleash-edge) independently of the Unleash server to support any number of front-end clients without overloading your Unleash instance - Scale with [Unleash Edge](https://docs.getunleash.io/reference/unleash-edge) independently of the Unleash server to support any number of frontend clients without overloading your Unleash instance
### Looking for more features? ### Looking for more features?
@ -183,7 +183,7 @@ Read more in the [_system overview_ section of the Unleash documentation](https:
To connect your application to Unleash you'll need to use a client SDK for your programming language. To connect your application to Unleash you'll need to use a client SDK for your programming language.
**Official server-side SDKs:** **Official backend SDKs:**
- [Go SDK](https://docs.getunleash.io/reference/sdks/go) - [Go SDK](https://docs.getunleash.io/reference/sdks/go)
- [Java SDK](https://docs.getunleash.io/reference/sdks/java) - [Java SDK](https://docs.getunleash.io/reference/sdks/java)
@ -194,9 +194,9 @@ To connect your application to Unleash you'll need to use a client SDK for your
- [Rust SDK](https://github.com/unleash/unleash-client-rust) - [Rust SDK](https://github.com/unleash/unleash-client-rust)
- [.NET SDK](https://docs.getunleash.io/reference/sdks/dotnet) - [.NET SDK](https://docs.getunleash.io/reference/sdks/dotnet)
**Official front-end SDKs:** **Official frontend SDKs:**
The front-end SDKs connect via [Unleash Edge](https://docs.getunleash.io/reference/unleash-edge) in order to ensure privacy, scalability and security. The frontend SDKs connect via [Unleash Edge](https://docs.getunleash.io/reference/unleash-edge) in order to ensure privacy, scalability and security.
- [Android Proxy SDK](https://docs.getunleash.io/reference/sdks/android-proxy) - [Android Proxy SDK](https://docs.getunleash.io/reference/sdks/android-proxy)
- [Flutter Proxy SDK](https://docs.getunleash.io/reference/sdks/flutter) - [Flutter Proxy SDK](https://docs.getunleash.io/reference/sdks/flutter)

View File

@ -23,16 +23,16 @@ export const useApiTokenForm = (project?: string) => {
const apiTokenTypes: SelectOption[] = [ const apiTokenTypes: SelectOption[] = [
{ {
key: TokenType.CLIENT, key: TokenType.CLIENT,
label: `Server-side SDK (${TokenType.CLIENT})`, label: 'Backend SDK',
title: 'Connect server-side SDK or Unleash Proxy/Edge', title: 'Creates a backend token to connect a backend SDK or Unleash Edge',
enabled: enabled:
useHasRootAccess(CREATE_CLIENT_API_TOKEN) || useHasRootAccess(CREATE_CLIENT_API_TOKEN) ||
hasCreateProjectTokenPermission, hasCreateProjectTokenPermission,
}, },
{ {
key: TokenType.FRONTEND, key: TokenType.FRONTEND,
label: `Client-side SDK (${TokenType.FRONTEND})`, label: 'Frontend SDK',
title: 'Connect web and mobile SDK directly to Unleash', title: 'Creates a frontend token to connect a frontend SDK',
enabled: enabled:
useHasRootAccess(CREATE_FRONTEND_API_TOKEN) || useHasRootAccess(CREATE_FRONTEND_API_TOKEN) ||
hasCreateProjectTokenPermission, hasCreateProjectTokenPermission,

View File

@ -125,7 +125,7 @@ export const CreateApiToken = ({ modal = false }: ICreateApiTokenProps) => {
loading={loadingCreateToken} loading={loadingCreateToken}
title={pageTitle} title={pageTitle}
modal={modal} modal={modal}
description="Unleash SDKs use API tokens to authenticate to the Unleash API. Client SDKs need a token with 'client privileges', which allows them to fetch feature flag configurations and post usage metrics." description='Unleash SDKs use API tokens to authenticate with the Unleash API. An SDK must be configured with a token of the corresponding type, so they can fetch feature flags and post usage metrics.'
documentationLink='https://docs.getunleash.io/reference/api-tokens-and-client-keys' documentationLink='https://docs.getunleash.io/reference/api-tokens-and-client-keys'
documentationLinkLabel='API tokens documentation' documentationLinkLabel='API tokens documentation'
formatApiCode={formatApiCode} formatApiCode={formatApiCode}

View File

@ -142,12 +142,12 @@ const tokenDescriptions: {
[index: string]: { label: string; title: string }; [index: string]: { label: string; title: string };
} = { } = {
client: { client: {
label: 'CLIENT', label: 'BACKEND',
title: 'Connect server-side SDK or Unleash Proxy/Edge', title: 'Connect backend SDK or Unleash Edge',
}, },
frontend: { frontend: {
label: 'FRONTEND', label: 'FRONTEND',
title: 'Connect web and mobile SDK', title: 'Connect frontend SDK',
}, },
admin: { admin: {
label: 'ADMIN', label: 'ADMIN',

View File

@ -334,10 +334,9 @@ export const EnvironmentCloneModal = ({
</FormControl> </FormControl>
<StyledInlineContainer> <StyledInlineContainer>
<StyledInputSecondaryDescription> <StyledInputSecondaryDescription>
A new Server-side SDK (CLIENT) API token A new backend API token will be generated
will be generated for the cloned for the cloned environment, so you can get
environment, so you can get started right started right away.
away.
</StyledInputSecondaryDescription> </StyledInputSecondaryDescription>
<ConditionallyRender <ConditionallyRender
condition={ condition={

View File

@ -175,10 +175,10 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
<StyledSdksGroup> <StyledSdksGroup>
<Box> <Box>
<Typography component='h4' variant='h4'> <Typography component='h4' variant='h4'>
Server-side SDKs Backend SDKs
</Typography> </Typography>
<Typography variant='body2' color='text.secondary'> <Typography variant='body2' color='text.secondary'>
Server-side clients run on your server and Backend clients run on your server and
communicate directly with your Unleash instance. communicate directly with your Unleash instance.
</Typography> </Typography>
</Box> </Box>
@ -208,10 +208,10 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
<StyledSdksGroup> <StyledSdksGroup>
<Box> <Box>
<Typography component='h4' variant='h4'> <Typography component='h4' variant='h4'>
Client-side SDKs Frontend SDKs
</Typography> </Typography>
<Typography variant='body2' color='text.secondary'> <Typography variant='body2' color='text.secondary'>
Client-side SDKs can connect to the{' '} Frontend SDKs can connect to the{' '}
<a <a
href='https://docs.getunleash.io/reference/unleash-edge' href='https://docs.getunleash.io/reference/unleash-edge'
target='_blank' target='_blank'
@ -225,9 +225,9 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
target='_blank' target='_blank'
rel='noopener noreferrer' rel='noopener noreferrer'
> >
Unleash front-end API Unleash Frontend API
</a> </a>
, but not to the regular Unleash client API. , but not to the regular Unleash Client API.
</Typography> </Typography>
</Box> </Box>
<StyledCardsGrid small> <StyledCardsGrid small>

View File

@ -5,7 +5,7 @@ export const bulkRegistrationSchema = {
$id: '#/components/schemas/bulkRegistrationSchema', $id: '#/components/schemas/bulkRegistrationSchema',
type: 'object', type: 'object',
required: ['appName', 'instanceId', 'environment'], required: ['appName', 'instanceId', 'environment'],
description: `An application registration. Defines the format POSTed by our server-side SDKs when they're starting up`, description: `An application registration. Defines the format POSTed by our backend SDKs when they're starting up`,
properties: { properties: {
connectVia: { connectVia: {
type: 'array', type: 'array',

View File

@ -16,7 +16,7 @@ export const clientFeaturesSchema = {
type: 'object', type: 'object',
required: ['version', 'features'], required: ['version', 'features'],
description: description:
'Configuration data for server-side SDKs for evaluating feature flags.', 'Configuration data for backend SDKs for evaluating feature flags.',
properties: { properties: {
version: { version: {
type: 'number', type: 'number',

View File

@ -98,7 +98,7 @@ export const resourceLimitsSchema = {
minimum: 0, minimum: 0,
example: 2000, example: 2000,
description: description:
'The maximum number of SDK and admin API tokens you can have at the same time. This limit applies only to server-side and client-side SDK tokens and to admin tokens. Personal access tokens are not subject to this limit. The limit applies to the total number of tokens across all projects in your organization.', 'The maximum number of SDK and admin API tokens you can have at the same time. This limit applies only to backend and frontend SDK tokens and to admin tokens. Personal access tokens are not subject to this limit. The limit applies to the total number of tokens across all projects in your organization.',
}, },
projects: { projects: {
type: 'integer', type: 'integer',

View File

@ -37,7 +37,7 @@ const OPENAPI_TAGS = [
{ {
name: 'Client', name: 'Client',
description: description:
'Endpoints for [Unleash server-side clients](https://docs.getunleash.io/reference/sdks).', 'Endpoints for [Unleash backend clients](https://docs.getunleash.io/reference/sdks).',
}, },
{ {
name: 'Context', name: 'Context',