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

Direct access to login servlet #15

Open
yavory opened this issue Oct 13, 2014 · 2 comments
Open

Direct access to login servlet #15

yavory opened this issue Oct 13, 2014 · 2 comments
Assignees
Labels

Comments

@yavory
Copy link

yavory commented Oct 13, 2014

I'm using version 1.2.1 of the MCB and if somebody directly accesses the login servlet, MCBLoginServlet.java, it raises an exception and code 500 is returned by Apache httpd. In IdP without MCB there is a possibility to check for a direct access and return a proper message without returning 500 status.
<%
StorageService storageService = HttpServletHelper.getStorageService(application);
LoginContext loginContext = HttpServletHelper.getLoginContext(storageService, application,request);
if (loginContext == null) {
%>

To fix this issue I added "try" block, line 130, in the "service" method of MCBLoginServlet class and that solved the problem.

try { application = this.getServletContext();
loginContext = (LoginContext)HttpServletHelper.getLoginContext(HttpServletHelper.getStorageService(application), application, request);
entityDescriptor = HttpServletHelper.getRelyingPartyMetadata(loginContext.getRelyingPartyId(),
HttpServletHelper.getRelyingPartyConfigurationManager(application));
entityID = entityDescriptor.getEntityID();
log.debug("Relying party = [{}]", entityID);
} catch (Exception e) {
log.error("Can't find entityID of the SP");
}

Is the original behavior intentional or is it an overlooked error?

@paulhethmon paulhethmon self-assigned this Jan 25, 2015
@paulhethmon
Copy link

Added code to detect the bookmark access. If this occurs the new behavior will be to return the error:

urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported
The SAML responder or SAML authority does not support the request.

By sending this value to the Shib authentication engine.

@paulhethmon
Copy link

Will be fixed in v1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants