Single sign on across subdomains, does my design make sense?

Problem Statement:

I am developing a single sign on solution for a midsize organization (<3000 employees) so that they can use it in their future internal software systems. The internal software systems are all subdomains of the company’s domain. (e.g.: hr.company.com, pm.company.com, etc.)

The future software systems will be mostly ASP.NET Core MVC applications with a possibility of having some SPAs or Blazor applications, but they will be mainly ASP.NET MVC.

The SSO System should be able to not only provide the authentication cookie but also it must be able to provide other software systems with the roles and claims that they may require.

The system admin should be able to revoke the claims of a user for a certain software system or logout the user from all the systems. It is required that the admin must be able to control the privilege’s of users in different systems from a central place. I also want the SSO system be as decoupled from other software systems as possible, without things getting too complex.

The solution needs to be self hosted and at least now I cannot used cloud based services.

My design:

Microsoft proposes sharing authentication cookie among ASP.NET apps as a valid way to provide an SSO experience. It seemed easy enough to me so I thought let’s go with it, especially as Identity Server is no longer free and OpenIddict may be too complex for what I have in mind.

In what I have in mind we will have a SSO application (with the address sso.company.com). We will keep user accounts and their claims and their roles using a customized ASP.NET Identity database. The internal systems will subscribe to the SSO application and the SSO application notifies them about the changes in the privileges of the user. To be more precise the SSO system will provide them with the latest claims and roles that a user have, in the notification.

When the unauthenticated users visit one of the internal systems (e.g. hr.company.com) they are redirected to the SSO web application, the SSO web application validates the user’s credentials, notifies the system that is specified in the return URL about the user’s claims, then creates the authentication cookie that contains some very basic claims like the name of the user, their job title, and their security stamp, the cookie’s domain will be set to ‘.company.com’, and the user will be redirected to the original website (in this example hr.company.com).

This is the general idea of what I want to implement. I have still some questions in mind.

  • How should I create the notification mechanism? Should the SSO use some web service call to notify other systems? Should I use something like RabbitMQ?
  • What would happen if the notification fail to reach its destination? How can I handle the risk of a user continuing with the wrong privileges?
  • How should I renew the authentication cookie especially if I use sliding expiration?

I would be thankful if you tell me if the design makes any sense, how it can be improved, and your answers to the questions I listed above.

New contributor

PedroAsking is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật