How do I prevent a user from being able to edit th...
# talk-kratos
a
How do I prevent a user from being able to edit their account details?
s
there is
traits
(read-write for the user),
metadata_public
(read-only for the user) and
metadata_admin
(no access for the user) see https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata
a
Thanks 👍
And a follow-up question, the user is created via a Microsoft login. If I define those Jsonnet mappers between metadata and the claims returned by Microsoft and one of the claims has changed, will it be automatically updated in Kratos?
@steep-lamp-91158
s
I don't think it will... but pretty sure there is an issue already for this
a
Do you happen to have a link?
s
https://github.com/ory/kratos/issues/2326 and possibly more are somewhat related
a
Ah, thats bad. Has any work been done in that direction?
s
I don't think so
but you can comment on any suiting issue, and if you are using Ory Network we can prioritize the issue
a
I am using Ory Network, but only the free version
Since it's possible to retrieve a user's social login OIDC token though, it should be possible to run the Jsonnet on a different server and then update the user remotely
s
yes I think there is some workarounds you can do
a
This also means that any changes to a jsonnet mapper wont get propagated to existing users, meaning user schemas will fall out of sync...
s
the whole concept needs some kind of migration for cases where you update the schema or mapper or similar same as migrations in document based databases
effectively it is a document based database
a
Since our user data is completely read-only and set based on data from the OIDC token, a proper migration wouldnt be necessary since it could be constructed from the token if an update occurs.
If that is understandable
We're still in the process of deciding if we will end up using Kratos in our application, but keeping records up to date is crucial for us. In case we do decide to use Kratos, do you do stuff like feature bounties for the issue you linked before?
s
we did not yet, but we can talk about that
a
I'll let you know then 👍
@steep-lamp-91158 Looks like there's some activity in regards to updating users now 😄 https://github.com/ory/kratos/issues/2898