[discourse] Using flipt authentication #4339
-
Originally posted by neelesh on Discourse I have pulled docker image in my local and flipt is now running in my local. Can we add authentication in our local server for testing purpose. In Settings → API Tokens , I am getting message Token athentication disabled. How do we enable that? I have see some posts related to config.yml file , where do put this file and what should be content of that file. We are going to use Django for our application |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To enable token authentication in your local Flipt server, you need to provide a config.yml file with the correct authentication settings. Here’s how you can do it:
authentication:
required: true
methods:
token:
enabled: true You can also configure session settings or exclude certain API sections if needed, but the above is the minimum to enable token authentication.
docker run -v /path/to/your/config.yml:/flipt/config.yml -p 8080:8080 flipt/flipt Replace
If you need more advanced authentication flows or want to manage tokens programmatically, check Flipt’s Let me know if you need an example of how to call Flipt’s API from Django or have other questions! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Reply from mark on Discourse: Copying the reply from Discord in case others come across the same question: In the docker container, the flipt configuration file is at /etc/flipt/config/default.yml which is explained here in the documentation:
Overview - FliptThis document describes how to configure the Flipt server. You will also find more details in here about how to configure the various authentication methods. The page one running in docker will also help Docker - Flipt it explains how to mount a custom configuration yaml into the container at the correct path. if you wanted to turn on token authentication for your Flipt instance, you would add the following to your config file, (ex: default.yml), then mount it in your Docker container like George mentioned using the Docker specific docs.
Authentication - FliptThis document describes how to configure Flipt's authentication mechanisms. |
Beta Was this translation helpful? Give feedback.
Reply from mark on Discourse:
Copying the reply from Discord in case others come across the same question:
In the docker container, the flipt configuration file is at /etc/flipt/config/default.yml which is explained here in the documentation:
Overview - Flipt
This document describes how to configure the Flipt server.
You will also find more details in here about how to configure the various authentication methods.
The page one running in docker will also help Docker - Flipt it explains how to mount a custom configuration yaml into the container at the correct path.
if you wanted to turn…