Tagging Management Overview
What is Tagging?
The Tagging Feature by Harness is a great way to organize and group your feature flags. You are able to create tags and assign them to, not only, categorize your Feature Flags, but also to manage permissions.
This feature is incredibly exciting for our users as they can now create a resource group based on tags, environments or both when needed. The tags can also be used to support searching and filtering through your feature flags. Further to this, when creating a resource group using Tagging, you can further define permissions for users and for user groups.
How To Use Tagging In Feature Flags
Creating A Tag
There are two methods to creating a tag in Feature Flag. You can do this by either creating a new Feature Flag or by editing an existing one. Here are the steps you need to follow:
Creating a Tag With A New Feature Flag
- On the Home Page of the Harness Application, head over to Feature Flags.
- Under the Feature Flags tab, click on New Feature Flag.
- You may be asked to select between the type of Feature Flag you want to create which are either Boolean or Multivariate. Please select one of these choices.
- Type the name of your Feature Flag and in the Tags box, type the name of your new tag and press Enter.
- Press Next and go on to save your Flag.
- Once saved, you should see the tags under your new Feature Flag.
Filtering Your Flags using Tags
- On the Home Page of the Harness Application, head over to Feature Flags.
- On the right hand side of the screen, you can type your tag or select the tag you want.
Editing A Tag
- On the Home Page of the Harness Application, head over to Feature Flags.
- Under the Feature Flags section, you should see a list of your existing flags.
- Select a flag that has a tag that you want to edit by clicking the three dots at the end of the flag and selecting Edit. This includes flags that don't have any assigned tags.
- On the next page, select the three dots located next to the name of your flag followed by Edit in the small dropdown menu that appears.
- You can, then, edit the tags or remove them or create a new one within the Tags box.
To further expand on this, when you're creating and editing tags in Feature Flags, there are only certain special characters that are permitted to be a part of the tag name/identifier.
The Regex is:
regexp.MustCompile("^[\\p{L}\\d .@_-]*$")
This allows for these special characters to be used: .
, @
, _
-
If you're not familiar with RBAC, check out this blog post on User and Role Management in the Harness Software Delivery Platform.
Adding RBAC to Tags
RBAC (Role Based Access Control) is an area lets you control who can access your resources and what actions they can perform on the resources. You can do this by assigning tags to the users within the Resource Group. Here are the steps on how to do this:
- On the Home Page of the Harness Application, head over to Feature Flags.
- Under the Feature Flags tab, scroll down and click on the Project Setup dropdown menu. Click Access Control.
- Click on the User you want to assign it to. If you do not have any users under this tab, click on New User on the top left of the screen and follow the steps to create one.
- Under the Resource Group column, you'll find the Role and/or the Resource Group the user is assigned to. Click on the Resource Group.
- On the left hand side should be a panel titled Resources. Scroll down until you reach the Feature Flags section and select your Resource Group.
- On the right hand side of the page, select By Tag, followed by Add Tag.
- From there, you can asign any pre-existing tags to the Resource Group.
- The tags assigned to users will control their permissions to toggle flags within Feature Flags. Users under the assigned tags will be restricted based on the permissions you have granted them, such as the ability to toggle flags or make edits within Feature Flags.
- Additionally, it's crucial to add Environments as a Resource Group. Do read the below subsection on Environments As A Resource Group to learn more.
If a user has the resource group ‘Feature Flag by tag’ assigned, the following rules apply:
- Toggle Permissions: Users will not be able to toggle flags that have no tags.
- Edit Config Permissions: Users will not be able to edit the configuration of flags with no tags.
- Tag-Specific Config Permissions: Users will only be able to edit the configuration of flags that have the tag(s) defined in their resource group.
Environments As A Resource Group
Additionally, it's crucial to add Environments as a Resource Group. This step helps limit the environments in which users can toggle a flag. By assigning tags to users within specific environments, you ensure that they only have access to toggle flags within those designated environments.
Check out the Manage Resource Groups in Harness if you'd like to learn more on this.
Editing Permissions For Users Within A Resource Group
Users that are assigned a role to create Feature Flags or delete Flags can have their permissions adjusted when they are added to a Resource Group. Here are the steps to adjusting the permissions for these users within a Resource Group:
- On the Home Page of the Harness Application, head over to Feature Flags.
- Under the Feature Flags tab, scroll down and click on the Project Setup dropdown menu. Click Access Control.
- You should find your list of Users. Select the Manage Role Bindings tag next to the User you want to adjust.
- Click Add and a dropdown will appear for you. From here, you're able to select a role for your selected user and the Resource Group where the role of the user would be active.
- Once you're done, select Apply.
- In the Access Control menu, click Roles and select the Feature Flag Admin Role. Review the permissions to ensure that the Create/Edit and Toggle options are highlighted.
- Go back to the Access Control page, select Resource Groups and select the Resource Group you would like to make changes to.
- The Tags for the Resource group will appear. In order to remove any assigned tags that is impacting permissions of some, or all, of ther users, select All next to the By Tag option.
- This should remove any blocks to permissions for the users in your selected Resource Group.
- If you'd like to create a new tag, you can go back to the Tags page, select Add and you'll be able to create a new one.
The user can now create flags once the resource group is changed to "Remove by Tag". You can also create a new tag if you'd like tio adjust permissions for users within your Resource Group.