Development environment question
Hi Kinde team,
I have a question around the development environments. Documentation says "There is currently no way to shift data or configuration settings between environments. For now, you need to replicate settings manually, and export/import data or use the Kinde Management API. It’s on our roadmap to make this easier someday."
But I have noticed that the "User management" settings between the Prod and Dev environment are in sync. Is this an expected behaviour ? When roles/permissions are created in Development, they are also being populated in Prod and vice versa
5 Replies
Hi, Thanks for reaching out.
Yes, this is expected behavior. Permissions and roles are defined at the 'Business' level in your Kinde account, which is the global level.
Specifically:
- Roles and permissions are defined at the business level, but applied to users at an organization level.
- While environments cannot share data or configuration settings generally, roles and permissions are an exception since they are defined globally at the business level.
This is why when you create roles/permissions in one environment, they appear in all environments - they are business-level configurations rather than environment-specific ones.
I hope that helps, let me know if any futher clarification needed.
Thanks.
I have also noticed that same with feature flags....does it also follow a similar pattern ? Is there a document reference or something that I can use for my internal documentation ?
Yes, feature flags follow a similar pattern.
And here is a documentation, you can get a detail info here about the topics we mentioned here
- https://docs.kinde.com/manage-users/about/
- https://docs.kinde.com/manage-users/roles-and-permissions/user-roles/
- https://docs.kinde.com/build/environments/environments/#switch-between-environments
- https://docs.kinde.com/releases/about/about-feature-flags/#feature-flag-use-cases
Let me know if any clarification needed. Thanks
And here is a documentation, you can get a detail info here about the topics we mentioned here
- https://docs.kinde.com/manage-users/about/
- https://docs.kinde.com/manage-users/roles-and-permissions/user-roles/
- https://docs.kinde.com/build/environments/environments/#switch-between-environments
- https://docs.kinde.com/releases/about/about-feature-flags/#feature-flag-use-cases
Let me know if any clarification needed. Thanks
Hi @Abdiwak - Kinde , I'm seeing a major issue with this approach. Kinde Webhooks sends events for role and permission events.
In the information that you have provided, whether we create roles/permissions in dev/prod, they are available on a business level BUT configured webhooks only gets triggered in the environment where the role/permissions were added/deleted. This will cause issues with syncing with our applications backend database.
Either they are separate on an environment level so that the processes can be separate or if they are common on a business level (like how it is currently) then any downstream processes that link with these should also work. For example if roles are created on a business level then webhooks should be triggered across the environments right ?
I'm sort of confused at the moment as there seems to be a gap here
If I want to have a role with the key admin in prod and dev, then I cannot do this because Kinde expects the key's to be unique.... but if I use only one role in Kinde then the event do not flow through both the environments
Hey there, Thanks for pointing that out.
Yes, that's correct. Webhooks are environment-specific, and roles/permissions are business-level. Here’s how it works,
1. When a role/permission is created in one environment, it exists at the business level
2. However, the webhook event for that creation only triggers in the environment where it was created
3. As a result, other environments' webhooks don’t receive that event, even though the role or permission exists there. This means your backend database could miss updates if it relies solely on webhook events for synchronization.
To maintain data consistency, you would need to either:
1. Set up identical webhooks in each environment
2. Or use the Kinde Management API to periodically verify and sync the data.
Note: Support for unique roles and permissions per environment is on our backlog.
Please visit our Feature release page ,and you can also submit your request using the 'Leave feedback' form. https://updates.kinde.com/board
Let me know if this helps, Thanks.
Yes, that's correct. Webhooks are environment-specific, and roles/permissions are business-level. Here’s how it works,
1. When a role/permission is created in one environment, it exists at the business level
2. However, the webhook event for that creation only triggers in the environment where it was created
3. As a result, other environments' webhooks don’t receive that event, even though the role or permission exists there. This means your backend database could miss updates if it relies solely on webhook events for synchronization.
To maintain data consistency, you would need to either:
1. Set up identical webhooks in each environment
2. Or use the Kinde Management API to periodically verify and sync the data.
Note: Support for unique roles and permissions per environment is on our backlog.
Please visit our Feature release page ,and you can also submit your request using the 'Leave feedback' form. https://updates.kinde.com/board
Let me know if this helps, Thanks.
Kinde - Feature release hub
Check out the latest product updates on the Kinde LaunchNotes page.