Item14901: Add support for XML and CERT data types in configure pages

pencil
Priority: Enhancement
Current State: Waiting for Release
Released In: 2.1.7
Target Release: patch
Applies To: Extension
Component: ConfigurePlugin
Branches: master Release02x01
Reported By: TimothyLegge
Waiting For:
Last Change By: MichaelDaum
Copied from Question1978

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 1. 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)

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

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 - 15 Apr 2020[[/pub/Tasks/Item14901/][]]

-- TimothyLegge - 15 Apr 2020

Okay, so this is merged now.

Only things remaining are:

  • add an entry to the change log of System.ConfigurePlugin
  • update VERSION and RELEASE in Foswiki::Plugins::ConfigurePlugin
  • update all copyright years as mentioned in the sources
  • cherry pick those changes to/from both active branches in the repo

Then flag this bug item waiting for release so that mentioning it in the release notes of 2.1.7 won't fall thru the crax.

-- MichaelDaum - 17 Apr 2020

I will do that later today or this weekend

-- TimothyLegge - 17 Apr 2020

Merger and think I did everything.

-- TimothyLegge - 19 Apr 2020
 
Topic revision: r7 - 19 Apr 2020, MichaelDaum
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