Chúng ta đã học cách configure để login vào 1 system bất kì bằng Google.
Con integrate với Microsoft Account thì chưa?
Nào chúng ta cũng tạo 1 tài khoản azure và làm việc trên nào.
Chúng ta thực hiện tạo 1 App registration
Tiếp theo bạn chọn đối tượng loging
Nó cũng có những phần giải thích:
Accounts in this organizational directory only (Default Directory only – Single tenant)
All user and guest accounts in your directory can use your application or API.
Use this option if your target audience is internal to your organization.
Accounts in any organizational directory (Any Microsoft Entra ID tenant – Multitenant)
All users with a work or school account from Microsoft can use your application or API. This includes schools and businesses that use Office 365.
Use this option if your target audience is business or educational customers and to enable multitenancy.
Accounts in any organizational directory (Any Microsoft Entra ID tenant – Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
All users with a work or school, or personal Microsoft account can use your application or API. It includes schools and businesses that use Office 365 as well as personal accounts that are used to sign in to services like Xbox and Skype.
Use this option to target the widest set of Microsoft identities and to enable multitenancy.
Personal Microsoft accounts only
Personal accounts that are used to sign in to services like Xbox and Skype.
Use this option to target the widest set of Microsoft identities.
Due to temporary differences in functionality, you may see errors if you attempt to switch between supported audiences after registering the application.
mình làm lab thì sẽ chọn: Accounts in any organizational directory (Any Microsoft Entra ID tenant – Multitenant)
mình sẽ quay lại rancher và enable AzureAD.
Qua bên Azure
Vì chúng ta sẽ sài rancher website và login thông qua azure login.
Chúng ta sẽ chọn web và Links verify sẽ lấy bên rancher.
Bạn sẽ cần copy
– Directory (tenant) ID ==> Tenant ID on rancher
– Application (client) ID ==> Application ID on rancher
Tiếp đến bạn sẽ cần copy value của client secret.
Bạn copy value trên vào application value on rancher.
tiếp đến là config Directory.Read.All trong api permissions
và bạn cũng đừng quên Grant admin consent
Bạn cần enable AzureAD provider trên rancher.
nếu như được như hình là OK
Bạn sẽ gặp lỗi như thế này. Nếu user không nằm trong your azure domain.
Bạn sẽ cần Invite user đó như một external User
Sau khi invite to join thì phía user sẽ nhận 1 email
Bạn có thể skip Microsoft Authenticator app
Đến đây user sẽ chưa thấy được cluster nào cả.
Bạn cần asign hoặc cấp quyền cho user nữa là ok.