sonata-nfv / son-gkeeper

SONATA's Service Platform Gatekeeper
http://www.sonata-nfv.eu
Apache License 2.0
2 stars 18 forks source link

Add user type restriction to create admin users #839

Open jbonnet opened 7 years ago

jbonnet commented 7 years ago

Only admin users can create other admin users

jbonnet commented 7 years ago

@dang03 We've discussed this, but I still have a doubt: since user creation is not restricted (you don't need the token), how is this possible (only admin users can create other admin users)?

dang03 commented 7 years ago

hi @jbonnet When the user registration process parses the new user JSON data, it specifically checks the userType. If it founds that the new user is an admin, then it requires and evaluates an access token.

Developers and customers users are free of access token when registering, however new admin registration requires a valid admin access token.