[mitreid-connect] Loading resources from client system
Justin Richer
jricher at mitre.org
Mon Jul 29 10:31:11 EDT 2013
Thanks for the feedback, I've added an issue for us to update the build
instructions.
If I recall, the base href is needed for things like that Javascript
application, to make sure that things get pulled from the right API
endpoints for instance. The relative URLs weren't working without the
"base" tag, and the rest of the system needed the "issuer" URL anyway so
we just used that.
-- Justin
On 07/29/2013 10:01 AM, Claes Gyllensvärd wrote:
> I see, thank you for explaining that. :)
>
> The build instructions were so incredibly simple (which is of course
> great) that I assumed no more configuration was necessary.
>
> Since it seems like this step is not optional, it might be useful to
> link to the server configuration from the bottom of
> https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/wiki/Build-instructions
> to make it harder to miss. :)
>
> Perhaps it would also be useful to explain when the base href is
> necessary? I've never come across the tag before, so at least to me,
> it's not obvious in which situations it's necessary. :)
>
> Kind regards, Claes
>
>
> 2013/7/29 Justin Richer <jricher at mitre.org <mailto:jricher at mitre.org>>
>
> That's not a bug -- you're actually supposed to edit or overlay
> this file:
>
> openid-connect-server/src/main/webapp/WEB-INF/server-config.xml
>
> If you see in there, there's a property called "issuer". This
> needs to be set to the root URL for your server. This is important
> for not only the resources that get served, but also the tokens
> and other things that are generated by the server. So you'll want
> to change the header.tag file back to what it was originally, and
> change the issuer value instead -- your browser won't always get
> the base right in all circumstances. Our documentation mentions this:
>
> https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/wiki/Server-configuration
>
> But if that could be written better, please suggest how we can fix
> this. Thanks!
>
> -- Justin
>
>
> On 07/29/2013 08:58 AM, Claes Gyllensvärd wrote:
>> For what it's worth, wrapping
>>
>> <base href="${config.issuer}">
>>
>> in
>>
>> openid-connect-server/src/main/webapp/WEB-INF/tags/header.tag
>>
>> with an HTML comment,
>>
>> <!-- <base href="${config.issuer}"> -->
>>
>> solves the issue for me, as the browser gets the base right even
>> without the explicit reference.
>>
>>
>> 2013/7/29 Claes Gyllensvärd <letharion at gmail.com
>> <mailto:letharion at gmail.com>>
>>
>> I've setup a server instance, with simply
>>
>> mvn package
>> cp server.war /path/to/tomcat
>>
>> The instance itself seem to come up just fine, and when I try
>> to access it, I get something that vaguely resembles the page
>> at https://id.mitre.org/connect/
>>
>> However, all resources the page wants, such as bootstrap, are
>> being loaded from "localhost:8080", instead of from
>> "internal-ip:8080", where the initial request fetches the
>> HTML page.
>>
>> So what's happening is that browser then tried to fetch these
>> resources from the client machine, instead of the server,
>> which doesn't work to well.
>>
>> The cause seems to be this head tag:
>>
>> <base href="http://localhost:8080/openid-connect-server/">
>>
>> Any suggestions for how I can get the base href corrected?
>>
>> Kind regards, Claes
>>
>>
>>
>>
>> _______________________________________________
>> mitreid-connect mailing list
>> mitreid-connect at mit.edu <mailto:mitreid-connect at mit.edu>
>> http://mailman.mit.edu/mailman/listinfo/mitreid-connect
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/mitreid-connect/attachments/20130729/b8d4c5ed/attachment-0001.htm
More information about the mitreid-connect
mailing list