Skip to content

Release version 0.8.0#43

Merged
Attakay78 merged 4 commits intomainfrom
develop
Mar 24, 2026
Merged

Release version 0.8.0#43
Attakay78 merged 4 commits intomainfrom
develop

Conversation

@Attakay78
Copy link
Owner

Features

  • Added support for standalone shield server with sdk
  • Added a full feature flag support with openfeature integration

Changes made
---

- **`SHIELD_SERVICE` env var fallback on all `--service` CLI options**:
`shield status`, `shield enable`, `shield disable`, `shield
maintenance`, and `shield schedule` all read `SHIELD_SERVICE`
automatically, set it once with `export SHIELD_SERVICE=payments-service`
and every command scopes itself to that service without repeating
`--service`. An explicit `--service` flag always wins.
- **`shield current-service` command**: shows the active service context
from the `SHIELD_SERVICE` environment variable, or a hint to set it when
the variable is absent.
- **`shield services` command**: lists all distinct service names
registered with the Shield Server, so you can discover which services
are connected before switching context.
- **Dashboard "Unprotected Routes" section**: the Rate Limits page now
surfaces all routes that have no rate limit policy, with an "Add Limit"
button per row that opens a modal to configure method, limit, algorithm,
and key strategy in-place — no CLI required.
- **Route existence validation in `set_rate_limit_policy()`**:
attempting to add a rate limit policy for a route that does not exist
now raises `RouteNotFoundException` immediately; the REST API returns
`404` and the CLI prints a clear error, preventing phantom policies from
accumulating.
- **`ShieldSDK.rate_limit_backend` parameter**: pass a `RedisBackend`
instance to share rate limit counters across all replicas of a service
connected to the same Shield Server; without it each replica enforces
limits independently.
- **Rate limit policy SSE propagation to SDK clients**: policies set or
deleted via the CLI or dashboard are now broadcast over the Shield
Server's SSE stream as typed `rl_policy` envelopes and applied to every
connected SDK client in real time, no restart required.
- **`ShieldSDK` auto-login (`username` / `password` params)**: pass
credentials directly to `ShieldSDK` instead of a pre-issued token; on
startup the SDK calls `POST /api/auth/login` with `platform="sdk"` and
caches the resulting long-lived token for the life of the process, no
manual token management required.
- **Separate SDK token lifetime (`sdk_token_expiry`)**: `ShieldServer`
and `ShieldAdmin` now accept `sdk_token_expiry` (default 1 year)
independently from `token_expiry` (default 24 h for dashboard / CLI
users), so service apps can run indefinitely without re-authentication
while human sessions remain short-lived.
- **`platform` field on `POST /api/auth/login`**: the login endpoint now
accepts `"cli"` (default) or `"sdk"` in the request body; `"sdk"` tokens
use `sdk_token_expiry` and are intended for machine-to-machine service
authentication.
#40)

**Feature flags** (`api-shield[flags]`): a full feature flag system
built on the [OpenFeature](https://openfeature.dev/) standard,
supporting boolean, string, integer, float, and JSON flag types with
multi-condition targeting rules, reusable user segments (explicit
included/excluded lists plus attribute-based rules), percentage
rollouts, prerequisite flags, individual user targeting, and a live SSE
evaluation stream.
Flags and segments are manageable from the admin dashboard
(`/shield/flags`, `/shield/segments`) and the CLI (`shield flags *`,
`shield segments *`) — including a new `shield segments add-rule`
command and an "Add Rule" panel in the Edit Segment modal that lets
operators add attribute-based targeting rules without touching code or
the REST API directly.
#41)

- **Per-service maintenance** (`engine.enable_service_maintenance`):
puts all routes of one service into maintenance mode at once without
affecting other services. SDK clients with a matching `app_id` receive
the sentinel over SSE and treat every request as if their own global
maintenance were enabled. Supports `reason`, `exempt_paths`, and
`include_force_active`, the same parameters as all-services global
maintenance. Controllable via the new `shield sm` CLI command group
(`status`, `enable`, `disable`), the REST API (`POST
/api/services/{service}/maintenance/enable|disable`), and the dashboard
Routes page (service maintenance card, shown when a service filter is
active). Audit log actions: `service_maintenance_on` and
`service_maintenance_off`.

- **Per-service global rate limit** (`engine.set_service_rate_limit`): a
rate limit policy scoped to a single service name that applies to all
routes of that service. Sits between the all-services global rate limit
and per-route limits in the enforcement chain, requests are checked in
order: global maintenance, service maintenance, global rate limit,
service rate limit, per-route rate limit. Configurable from the
dashboard Rate Limits page (service RL card, shown when a service filter
is active) and the new `shield srl` CLI command group (`get`, `set`,
`delete`, `reset`, `enable`, `disable`). Uses `GlobalRateLimitPolicy` —
the same model as the all-services global rate limit. Persisted in the
backend via a sentinel key so the policy survives Shield Server
restarts.
- Added support to audit feature flags and segments mutations for
actionable accountability.
- Moved the audit log tab to last position on the side navbar
@Attakay78 Attakay78 self-assigned this Mar 24, 2026
@Attakay78 Attakay78 merged commit a6c1548 into main Mar 24, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant