Key takeaways
- Authentication confirms identity; authorisation decides what that identity may do.
- Use proven standards such as OAuth 2.0 and OpenID Connect rather than building login from scratch.
- Enable multi-factor authentication, especially for administrators.
- Apply least privilege and review access regularly.
Almost every business system needs to know who is using it and what they may do. Getting these two ideas right, and keeping them separate, is a foundation of secure design.
Authentication and authorisation
Authentication answers "who are you?" through passwords, one-time codes, hardware keys or biometrics. Authorisation answers "what may you do?" through roles, permissions and rules. A person can be fully authenticated and still not be allowed to see a particular record.
Single sign-on (SSO)
With SSO, people sign in once to a central identity provider, such as a corporate directory, and access many applications. Benefits include fewer passwords, central enforcement of policies and instant removal of access when someone leaves.
OAuth 2.0 and OpenID Connect
OAuth 2.0 is a standard for delegated access: it lets an application act on a user's behalf with limited, revocable permissions, without sharing the password. OpenID Connect builds on it to confirm identity. Together they power sign-in with a corporate or social account and secure API access.
Design good authorisation
- Role-based access control. Assign permissions to roles such as viewer, editor or administrator.
- Least privilege. Give each role only what it needs.
- Check on the server. Hiding a button is not security; every request must be authorised where the data lives.
- Object-level checks. Verify the user may access that specific record, not just that type of record.
Operational practices
- Require multi-factor authentication for administrators and sensitive actions.
- Rate-limit sign-in attempts and watch for unusual patterns.
- Keep an audit log of sign-ins and permission changes.
- Review who has access on a schedule and remove what is no longer needed.
Build on a proven identity provider or library instead of writing your own, and spend your effort on the permission model that reflects your business.
An illustrative example
The following scenario is hypothetical and is included only to illustrate the ideas above.
A company's portal uses a home-made login. A security review finds weak password storage and no protection against repeated guessing. Replacing it with an established identity provider adds multi-factor authentication, single sign-on for staff and standard session handling in a few weeks.
The team also redesigns permissions around roles that reflect real jobs, adds server-side checks for each record and begins a quarterly access review, which immediately finds several accounts of former contractors that were still active.
How to start in the next 30 days
- Week 1: List user types, roles and sensitive actions.
- Week 2: Choose an identity provider and plan the migration.
- Week 3: Implement role checks on the server and test them.
- Week 4: Enable multi-factor authentication and schedule access reviews.
Common mistakes to avoid
- Building your own login system. Password storage, resets and session handling are easy to get wrong. Use proven components.
- Checking permissions only in the interface. Servers must enforce every rule.
- Too many administrators. Broad privileges increase the damage of any compromised account.
- No offboarding process. Former staff and contractors keep access unless removal is automatic.
- Weak session handling. Short lifetimes, secure cookies and revocation matter.
A practical checklist
- Choose an established identity provider.
- Require multi-factor authentication for privileged users.
- Define roles from real job functions.
- Check object-level permissions on the server.
- Log sign-ins and permission changes.
- Review access every quarter.
- Automate removal when people leave.
Frequently asked questions
What is the difference between OAuth and OpenID Connect?
OAuth 2.0 handles delegated authorisation, letting an app act with limited permission. OpenID Connect adds a standard way to confirm who the user is.
Do we need SSO?
If staff use many applications, SSO improves security and convenience. For a small single product it may not be necessary at first.
Is multi-factor authentication worth the friction?
For administrators and sensitive actions, yes. It blocks most attacks that rely on stolen passwords.
Questions to ask your team or vendor
Good answers are specific and evidence-based. Vague answers are a signal to dig deeper.
- Which identity provider do we use? A proven one, not a home-made system.
- Is multi-factor authentication enforced? At least for administrators.
- How are roles defined? From real job functions.
- Where are permissions enforced? On the server for every request.
- How often is access reviewed? Quarterly or better.
- How are leavers removed? Automatically.
Final thoughts
Identity is the new perimeter. Build on proven standards, design permissions around real roles, enforce them on the server and review them regularly, and you remove a large class of risk with relatively modest effort.
