Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused Authorization Policy equals broken site #724

Closed
PorreKaj opened this issue Apr 3, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@PorreKaj
Copy link

commented Apr 3, 2019

Trying to convert my site to using Windows Auth caused me a great deal of headache.

In the end I found out that if you add a new-UDAuthorizationPolicy that isn't used on any of your pages, the entire site breaks and you're left with a grey page (or I guess depending on theme).

$HRPolicy = New-UDAuthorizationPolicy -Name "HumanResources" -Endpoint {
    param($ClaimsPrincipal)
    $ClaimsPrincipal.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", "S-1-5-21-1168975120-759244214-17591369-17222") 

}


$AdminPolicy = New-UDAuthorizationPolicy -Name "Admins" -Endpoint {
    param($ClaimsPrincipal)
    $ClaimsPrincipal.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", "S-1-5-21-1168975120-759244214-17591369-17223")
    
}

$AuthMethod = New-UDAuthenticationMethod -Windows
$LoginPage = New-UDLoginPage -AuthenticationMethod $AuthMethod -PassThru -AuthorizationPolicy @($HRPolicy, $AdminPolicy)

If I misspell "HumanResources" in the -authorizationPolicy on any of my pages, the site breaks.

I don't know if its intentional or if it even something that needs to be fixed, but it did certainly bug me.

@adamdriscoll adamdriscoll added the bug label Apr 3, 2019

@adamdriscoll

This comment has been minimized.

Copy link
Member

commented Apr 3, 2019

Oy. Yeah that is annoying.

@adamdriscoll adamdriscoll added this to the 2.4 milestone May 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.