This question about Configuration: Answered

Add support for XML and CERT data types in configure pages

I am looking at some improvements to the configuration of the SamlLoginContrib. It currently requires you to put the certs and the metadata.xml on the server in a location to be read in as a file. I would like to allow adding those items to the LocalSite.cfg.

I propose adding:
  1. Types.CERT
  2. Types.XML

to ConfigurePlugin /pub/System/ConfigurePlugin/types.uncompressed.js

The only field present currently that is big enough is Types.PERL which tries to evaluate as valid perl.

I did a PoC just making the validation pass with:
av = eval(1);  // FIXME: TIM
bv = eval(1);  // FIXME: TIM

and the resulting fields will work for me.

I don't mind doing the work to validate that the xml is valid uncommented xml and that the cert is a valid certificate but I want to check whether this would be considered for inclusion first. There are a least a few plugins/contribs that would be improved by a larger field for certificates (LDAP and SMTP)


-- TimothyLegge - 12 Apr 2020

Was't really paying attention, the firl I mentioned is Java Script so validating a certificate format would require either something like PKI.js or simply checking for the correct beginning and ending of a base64 encoded cert. I imagine xml check might be possible in Javascript but I have not looked

-- TimothyLegge - 12 Apr 2020

The attached types.uncompressed.js.diff does what I would like. I am not a Javascript programmer nor do I play one on TV so feel free to improve.

-- TimothyLegge - 12 Apr 2020

Awesome. How about you apply for git access and you'll check it in yourself smile

-- MichaelDaum - 13 Apr 2020

lol. Here I go volunteering again... Will try later today.

-- TimothyLegge - 13 Apr 2020

Welcome on board.

-- MichaelDaum - 13 Apr 2020

Logged as Item14901 and added a Merge request

-- TimothyLegge - 15 Apr 2020

QuestionForm edit

Subject Configuration
Extension ConfigurePlugin
Version Foswiki 2.1.6
Status Answered
Related Topics Item14901
Topic revision: r7 - 15 Apr 2020, TimothyLegge
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy