课程: Secure Coding in Go

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Authorization

Authorization

- [Instructor] A common mistake is to assume that once a user is authenticated, they can do everything. In some small cases, this might be a good option but in most systems, we'd like to give different users different permissions. You can imagine that the site administrator will guard the passwords more than the new intern. It's a good idea not to give the intern the possibility to delete the production database or access pair. The two most common authentication scheme are access-control list and role-based access control. Access-control lists, or ACL, is something you're probably familiar with. The Unix file system uses ACL, so if I'm going to do ls -l for long, I'm going to see the permission here on the left side. The user, which is me, has read, write and no execute permission. That's the minus. And the group, which is staff and others, I can only read the current files. In the role-based access control,…

内容