0c78980502
* wip: environment for permissions * fix: add migration for roles * fix: connect environment with access service * feat: add tests * chore: Implement scaffolding for new rbac * fix: add fake store * feat: Add api endpoints for roles and permissions list * feat: Add ability to provide permissions when creating a role and rename environmentName to name in the list permissions datastructure * fix: Make project roles resolve correctly against new environments permissions structure * fix: Patch migration to also populate permission names * fix: Make permissions actually work with new environments * fix: Add back to get permissions working for editor role * fix: Removed ability to set role type through api during creation - it's now always custom * feat: Return permissions on get role endpoint * feat: Add in support for updating roles * fix: Get a bunch of tests working and delete a few that make no sense anymore * chore: A few small cleanups - remove logging and restore default on dev server config * chore: Refactor role/access stores into more logical domains * feat: Add in validation for roles * feat: Patch db migration to handle old stucture * fix: migration for project roles * fix: patch a few broken tests * fix: add permissions to editor * fix: update test name * fix: update user permission mapping * fix: create new user * fix: update root role test * fix: update tests * feat: Validation now works when updating a role * fix: Add in very barebones down migration for rbac so that tests work * fix: Improve responses from role resolution - getting a non existant role will throw a NotFound error * fix: remove unused permissions * fix: add test for connecting roles and deleting project * fix: add test for adding a project member with a custom role * fix: add test for changing user role * fix: add guard for deleting role if the role is in use * fix: alter migration * chore: Minor code cleanups * chore: Small code cleanups * chore: More minor cleanups of code * chore: Trim some dead code to make the linter happy * feat: Schema validation for roles * fix: setup permission for variant * fix: remove unused import * feat: Add cascading delete for role_permissions when deleting a role * feat: add configuration option for disabling legacy api * chore: update frontend to beta version * 4.6.0-beta.0 * fix: export default project constant * fix: update snapshot * fix: module pattern ../../lib * fix: move DEFAULT_PROJECT to types * fix: remove debug logging * fix: remove debug log state * fix: Change permission descriptions * fix: roles should have unique name * fix: root roles should be connected to the default project * fix: typo in role-schema.ts * fix: Role permission empty string for non environment type * feat: new permission for moving project * fix: add event for changeProject * fix: Removing a user from a project will now check to see if that project has an owner, rather than checking if any project has an owner * fix: add tests for move project * fix: Add in missing create/delete tag permissions * fix: Removed duplicate impl caused by multiple good samaritans putting it back in! * fix: Trim out add tag permissions, for now at least * chore: Trim out new add and delete tag permissions - we're going with update feature instead * chore: update frontend * 4.6.0-beta.1 * feat: Prevent editing of built in roles * fix: Patch an issue where permissions for variants/environments didn't match the front end * fix: lint Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com> Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com> |
||
---|---|---|
.do | ||
.github | ||
docs/api/oas | ||
examples | ||
scripts | ||
src | ||
website | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.node-version | ||
.nvmrc | ||
.prettierignore | ||
app.json | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
package.json | ||
README.md | ||
renovate.json | ||
setupJest.js | ||
tsconfig.json | ||
yarn.lock |
Unleash is an open-source feature management platform. It provides a great overview of all feature toggles/flags across all your applications and services. Unleash enables software teams all over the world to take full control of how they enabled new functionality to end-users.
Unleash comes with official client SDKs for all the popular languages.
Features
Open-Source
- Boolean feature toggles (on/off)
- Canary release (Gradual rollout)
- Targeted release
- Experimentation (A/B testing)
- Kill Switches
- Custom activation strategies
- Privacy first (GDPR) where end-user data never leaves your application
- Audit logs
- Addons integrating with other popular tools (Slack, Teams, Datadog, etc.)
- It is secure (Enable Secure Headers with strict HTTPS only mode)
- Extremely scalable with evaluations on the client-side. Used in enterprises handling more than 10k req/s. Read more about our architecture
- Dashboard to manage technical debt
- Admin APIs
- Flexible architecture and can be hosted anywhere
- Docker image available
Enterprise
Unleash Enterprise builds directly on top of the Open-Source (open-core) and provides additional advanced functionality:
- Project support
- Advanced segmentation
- Environments (unlimited)
- SSO (SAML 2.0, OpenID Connect, etc)
- A cloud offering where the Unleash team host, monitor, scale, patches, upgrades and take full backups for you
- Self-hosted possible
- SLA guarantees
- Support
Unleash SDKs
In order to connect your application to Unleash you need to use a client SDK for your programming language.
Official Server SDKs:
Official Frontend SDKs:
The frontend SDKs connects via the Unleash Proxy in order to ensure Privacy, scalability and security.
Community SDKs
In addition there exists a good list of community developed SDKs, so there might already exist an implementation for your favorite programming language (e.g. Rust, Elixir, Dart, Clojure, NestJS, Kotlin, PHP and more.)
Architecture
Read more in the Unleash documentation
What is a feature toggle?
The main motivation for doing feature toggling is to decouple the process for deploying code to production and releasing new features. This helps reducing risk, and allow us to easily manage which features to enable, and have full control of how we exposed the new feature for.
Feature toggles decouple deployment of code from release of new features
This repo contains the unleash-server, which contains the Unleash Admin UI and the Unleash API. To make use of unleash you will also need a client SDK.
Segmentation
It's fine to have a system for turning stuff on and off. But sometimes we want more granular control, we want to decide who the toggle should be enabled for. This is where activation strategies come into the picture. Activation strategies take arbitrary config and allow us to enable a toggle to a specific subset of your users (segment).
Common activation strategies includes:
- Active For users with a specified userId
- GradualRollout to X-percent of our users
- Active for our beta users
- Active only for application instances running on host x.
Read more about activation strategies in our docs.
The Client API
The client SDKs provides a simple abstraction making it easy to check feature toggles in your application. The code snippet below shows how you would use Unleash
in Java.
if (unleash.isEnabled("AwesomeFeature")) {
//do some magic
} else {
//do old boring stuff
}
Running Unleash
The are numbers of ways you can run Unleash.
- Unleash Enterprise - Cloud hosted by the Unleash Team. see plans
- Unleash Open-Source - Self host with Docker. Guide
- Unleash Open-Source - Self host with Node.js Guide
- Unleash Open-Source - Helm chart artifacthub.io
Run from Docker
- Create a network by running the following command:
docker network create unleash
- Start a postgres database:
docker run -e POSTGRES_PASSWORD=some_password \
-e POSTGRES_USER=unleash_user -e POSTGRES_DB=unleash \
--network unleash --name postgres postgres
- Start Unleash via docker:
docker run -p 4242:4242 \
-e DATABASE_HOST=postgres -e DATABASE_NAME=unleash \
-e DATABASE_USERNAME=unleash_user -e DATABASE_PASSWORD=some_password \
-e DATABASE_SSL=false \
--network unleash unleashorg/unleash-server
The first time Unleash starts it will create a default user which you can use to sign-in to your Unleash instance and add more users with:
- username:
admin
- password:
unleash4all
Users of Unleash
Unleash is trusted by thousands of companies all over the world (we are tracking more than 90 countries already). Proud Open-Source users:
(PS! feel free to submit your logo!)
Contribute to Unleash
Unleash has been built with the help of many smart individuals. This ensures that we build a product that solves real problems for people. If you want to contribute to this project you are encouraged to send issue requests, or provide pull-requests.
- Read CONTRIBUTING.md to learn more on how you can contribute
- Browse the developer-guide for tips on environment setup, running the tests, and running Unleash from source.
Community and Help
We know that learning a new tool can be hard and time-consuming. We have a growing community that loves to help out. Please don't hesitate about reaching out to get help.
- Join Unleash on Slack if you want ask open questions about Unleash, feature toggling or discuss these topics in general.
- Create a issue request if you have found a bug or have ideas on how to improve Unleash.
- Follow Unleash on Twitter if you want to stay updated on the latest progress of the Unleash project.
In the media
- Free Code Camp: Feature toggles - Why and how to add to your software
- Feature toggling transient errors in load tests (English)
- The Code Kitchen Episode 7: Feature flags with Unleash (English)
- Utviklerpodden, 1 - Feature Flags og Unleash med Fredrik Oseberg (Norwegian)
- Node Weekly issue 380
- Console 42 - The open-source newsletter
- This Week in Rust 340
- Unleash-hosted - Unleash as a Service
- Medium blog
- Blog: Unleash your features gradually!
- Presentation: Unleash your features gradually!
- http://martinfowler.com/bliki/FeatureToggle.html