FHIR Chat · Redirect to secure hl7 page · IG creation

Stream: IG creation

Topic: Redirect to secure hl7 page


view this post on Zulip Laxmi Singh (Jun 22 2021 at 13:19):

Below is the screenshot of terminology Bindings table which gets displayed by default on each resource page.
image.png
Under the conformance If you click on any Binding strength value , eg: 'extensible' and it will redirect to "http://hl7.org/fhir/R4/terminologies.html#extensible" . Please notice it redirects to 'http' NOT 'https' . My requirement is to redirect it to https . How can this be achieved as 'http' is insecure . Similar issue happens when I click on codeSystem/ValueSet link from Terminology table. As this table comes by default, I am not sure how to edit anything inside this table.

view this post on Zulip Eric Haas (Jun 23 2021 at 05:19):

this base path "http://hl7.org/fhir/R4/", is generated by the ig-publisher for all the fhir artifacts and cannot (as far as I can tell) be modified. However, if your are publishing locally and not using the autobuilder you could try a find and replace in the output file as a post ig-publisher step.

view this post on Zulip Laxmi Singh (Jun 23 2021 at 05:25):

I am running Publish.bat file to create IG . My IG is embedded into my company's URL which is https , so when I am clicking on any HL7 FHIR link which is redirecting to 'http://hl7.org/fhir/R4/' it is unable to open in the same view.
image.png

view this post on Zulip Laxmi Singh (Jun 23 2021 at 07:00):

@Jose Costa Teixeira You have any suggestions? Is there a way to do it. ?

view this post on Zulip Eric Haas (Jun 23 2021 at 07:19):

....so why not do a find "http://hl7.org/fhir/R4/", and replace "https://hl7.org/fhir/R4/" of the static html files in the output folder...

view this post on Zulip Grahame Grieve (Jun 23 2021 at 07:23):

well, this is something I should solve, but I'm not sure how simple it will be to solve. The url comes from the packages, and these are immutable .

view this post on Zulip Laxmi Singh (Jun 23 2021 at 10:38):

@Grahame Grieve Please take this into consideration so that FHIR url's are HTTPS instead of HTTP.

view this post on Zulip Grahame Grieve (Jun 24 2021 at 01:50):

this turns out to be a drama. For some reason I can't see, the external link gets added to all fhir links if I change the url from http://hl7.org/fhir to https://hl7.org/fhir. I can't see why that happens

view this post on Zulip Grahame Grieve (Jun 24 2021 at 01:50):

I think it's a stylesheet thing, but I can't see why the stylesheet doesn't add it for http://hl7.org/fhir

view this post on Zulip Eric Haas (Jun 24 2021 at 01:53):

Are both http://hl7.org/fhir and https://hl7.org/fhir coded in as liquid variables or hardcoded strings or one of each?

view this post on Zulip Eric Haas (Jun 24 2021 at 01:54):

(deleted)

view this post on Zulip Eric Haas (Jun 24 2021 at 01:55):

(deleted)

view this post on Zulip Eric Haas (Jun 24 2021 at 01:58):

(deleted)

view this post on Zulip Grahame Grieve (Jun 24 2021 at 05:06):

it has nothing to do with liquid.

view this post on Zulip Laxmi Singh (Jul 01 2021 at 06:54):

Is there any plan to include this change in future ? I will make changes in my product accordingly.

view this post on Zulip Grahame Grieve (Jul 01 2021 at 08:36):

no one has tried to solve the stylesheet problem, so I haven't turned secure links on in the code

view this post on Zulip Eric Haas (Jul 01 2021 at 15:53):

Grahame Grieve said:

this turns out to be a drama. For some reason I can't see, the external link gets added to all fhir links if I change the url from http://hl7.org/fhir to https://hl7.org/fhir. I can't see why that happens

are you referring to this?
image.png

view this post on Zulip Grahame Grieve (Jul 01 2021 at 19:20):

yes. if the links to hl7.org/fhir change to https://, all of them get that link, and they do not if they are just http://, and I couldn't figure out why the difference.

view this post on Zulip Eric Haas (Jul 01 2021 at 21:47):

here is the CSS: ~/template/content/assets/css/project.css

/* =========== external links ============= */
p a[href^="http://"]:not([no-external^="true"]):after, a[href^="https://"]:not([no-external^="true"]):after {
    content: url(../images/external.png);
    display: inline-block;
    text-decoration: none;
    padding-left: 3px;
}

li a[href^="http://"]:not([no-external^="true"]):after, a[href^="https://"]:not([no-external^="true"]):after {
    content: url(../images/external.png);
    display: inline-block;
    text-decoration: none;
    padding-left: 3px;
}

view this post on Zulip Eric Haas (Jul 01 2021 at 21:48):

and it should get applied equally to both as it does in the pages: for example here:

image.png

view this post on Zulip Grahame Grieve (Jul 01 2021 at 21:56):

image.png

view this post on Zulip Grahame Grieve (Jul 01 2021 at 21:57):

if I change the links to https:// then all the links to FHIR in this table get the external link indicator provided.

view this post on Zulip Grahame Grieve (Jul 01 2021 at 21:57):

there's other places it happens too

view this post on Zulip Eric Haas (Jul 01 2021 at 21:59):

it is happening for http too and it should not since css nly for p and li nodes:

image.png

view this post on Zulip Eric Haas (Jul 01 2021 at 21:59):

(us core latest)

view this post on Zulip Grahame Grieve (Jul 01 2021 at 22:00):

i think that no references to hl7.org/fhir should be marked as external. Perhaps we should make that explicit in the css?

view this post on Zulip Eric Haas (Jul 01 2021 at 22:07):

One of the reasons they are added is it can be confusing to the reader when they click on a link and don't realize that they are outside the spec since the igs look very similar to the fhir spec.

view this post on Zulip Eric Haas (Jul 01 2021 at 22:08):

my example above of birth sex actually is actually a https link. let me investigate the css a little more

view this post on Zulip Eric Haas (Jul 01 2021 at 22:44):

ok I think this will fix it:

/* =========== external links ============= */
p a[href^="http://"]:not([no-external^="true"]):after, p a[href^="https://"]:not([no-external^="true"]):after {
    content: url(../images/external.png);
    display: inline-block;
    text-decoration: none;
    padding-left: 3px;
}

li a[href^="http://"]:not([no-external^="true"]):after, li a[href^="https://"]:not([no-external^="true"]):after {
    content: url(../images/external.png);
    display: inline-block;
    text-decoration: none;
    padding-left: 3px;
}

view this post on Zulip Eric Haas (Jul 01 2021 at 22:45):

image.png

view this post on Zulip Eric Haas (Jul 01 2021 at 22:45):

let me check if css is kosher first

view this post on Zulip Eric Haas (Jul 01 2021 at 22:51):

the original css would apply to any p or li element with href starting with 'http" and and any element starting with "https" so that is why.

view this post on Zulip Eric Haas (Jul 01 2021 at 22:52):

I will make a PR to the base template as a technical correction @Lloyd McKenzie ?

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 15:42):

Merged

view this post on Zulip Laxmi Singh (Jul 06 2021 at 11:53):

@Grahame Grieve @Lloyd McKenzie As the CSS changed is merged, did we turn on secure links ?

view this post on Zulip Lloyd McKenzie (Jul 06 2021 at 15:13):

What do you mean by "secure links"?

view this post on Zulip John Moehrke (Jul 06 2021 at 18:51):

https vs http.... crossing the boundary is a violation.

view this post on Zulip Lloyd McKenzie (Jul 06 2021 at 18:54):

Within IGs, there are almost certainly going to be mixed links. We can't guarantee that all targets will support https and we're referencing things across a wide variety of locations.

view this post on Zulip John Moehrke (Jul 06 2021 at 20:00):

security is hard work. the biggest problem I have seen in IGs is the calling upon javascript on another site using different security. I handled this in IHE by just moving those .js over to the IHE site, and using referential links rather than absolute.

view this post on Zulip Lloyd McKenzie (Jul 06 2021 at 20:44):

It's not a question of hard work here, it's a question of what's in our control - and how other people host things we need to reference isn't in our control.

view this post on Zulip Eric Haas (Jul 06 2021 at 20:49):

if one reads the entire thread, the commenter was unable to use the default path "http://hl7.org/fhir/R4/" ( using the site variable {{site.data.fhir.path}} ), and wanted to replace with "https://hl7.org/fhir/R4/". An editor is free to use either https or http, but the templated links are out their control.

view this post on Zulip Eric Haas (Jul 06 2021 at 20:51):

hence the bug in the css causing a rendering issue due to a proliferation of external link icons. That is now fixed, and I don't think there is anything technical standing in the way of making the change.

view this post on Zulip Grahame Grieve (Jul 13 2021 at 20:11):

@Mark Iantorno there's a global switch for this, with a parameter that defaults to false. Now that I'm on the road, I forget the details. Let me know if you can't find it

view this post on Zulip Mark Iantorno (Jul 13 2021 at 20:11):

I will look

view this post on Zulip Grahame Grieve (Jul 13 2021 at 20:15):

also in /org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageHacker.java, see useSecureReferences

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:38):

Alright I see it and can make the change. It doesn't look like the variable is actually ever set in the publisher?

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:39):

I searched for all references to the PackageHacker class

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:39):

image.png

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:39):

So, am I right in assuming that changing the default useSecureReferences = false will result in it just being true for all publishing?

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:40):

Should I provide users with some kind of choice for this in the publication process?

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:41):

For now, I'm going to make the change to the default value, setting it to true, and open a PR, then when I get the go/nogo I can either merge it quickly to resolve the issue, or add some further configuration.

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:45):

https://github.com/hapifhir/org.hl7.fhir.core/pull/558

view this post on Zulip Mark Iantorno (Jul 14 2021 at 13:45):

Pull Request is there


Last updated: Apr 12 2022 at 19:14 UTC