Metadata: Add support for Registration Information

Add functionality to the MetadataGenerationService to emit Registration
and Publishing Information (RPI) as requested in the eduGAIN metadata
profile.

This functionality is controlled by these configuration variables (with
sample values):

config.aaf.fr.metadata.registrationAuthority = "https://www.federation.org/"
config.aaf.fr.metadata.registrationPolicy = "https://www.federation.org/RegistrationPolicy/"
config.aaf.fr.metadata.registrationPolicyLang = "en"

Without these values set (which is the default), this functionality is
not active.

The sample configuration file fr-config.groovy.example has sample
configuration which is commented out by default.

The MetadataGenerationService pulls this information from the config and
stores this cached locally (can be refreshed with a call to
initializeRegInfoConfig() which is otherwise called only the first time
these settings are accessed).

There is a corresponding test in MetadataGenerationServiceSpec with
expected output in testvalidentitiesdescriptorwreginfo.xml
Metadata: MetadataGenerationSv as InitializingBean

Initialize the MetadataGenerationService as an InitializingBean to
address the comments raised in #157:

* removed commented-out constructor.

* implemented org.springframework.beans.factory.InitializingBean to get
  notifications after dependencies are injected.

* rename initializeRegInfoConfig() to afterPropertiesSet() to match the
  InitializingBean interface.

* drop the registrationInitialized variable tracking whether we have
  initialized.

* drop the calls to initializeRegInfoConfig() as the intializion gets
  called automatically after dependencies are injected.
** this also addresses the request to split the call onto multiple lines
   - the call has now been removed instead.

* and adjusted the spock test for the feature to force re-initialization
  by instead explicitly calling metadataGenerationService.afterPropertiesSet()
Reporting: fix typo in error message
Reporting: CA Usage: skip disabled certificates

The CA Usage Compliance Report has been producing data that was looking
bogus - turns out it was doing a report over all certificates, including
the ones taht had been "deleted" from the descriptor - which in reality
is only being flagged as disabled.

Fix this by honouring the "disabled" flag and skipping over such
certificates in the causage report.
Base: Fix CryptoService to properly decode DN

This is similar to what was handled in \#154 / commit
8a032c8f8ce90bd749ebe67e8dbb8b04fa15a7a7

Some CAs represent the email address with OID 1.2.840.113549.1.9.1 which
does not get decoded by getSubjectX500Principal().getName() /
getIssuerX500Principal().getName() and is displayed as the OID with the
value being printed out in hex - like:

1.2.840.113549.1.9.1=#16197072656d69756d2d736572766572407468617774652e636f6d,CN=Thawte
Premium Server CA,OU=Certification Services Division,O=Thawte Consulting
cc,L=Cape Town,ST=Western Cape,C=ZA

Fix this by instead getName(String format, Map oidMap) method and
provide an oidMap mapping this OID to "E".

Define the oidMap HashMap as a class field for CryptoService and reuse
that from the issuer() and subject() methods.
APIv1: Fix IdP and SP web links in json responses

Minor bug: the IdP and SP APIv1 controllers were generating incorrect
weblink entries in the JSON data for an IdP or SP:

IdP: "weblink":"https://registry.tuakiri.ac.nz/federationregistry/IDPSSODescriptor/show/3"
SP:  "weblink":"https://registry.tuakiri.ac.nz/federationregistry/SPSSODescriptor/show/5"

The links should actually be pointing to:

   identityProvider controller instead of IDPSSODescriptor
and
   serviceProvider controller instead of SPSSODescriptor

Fixed the 'controller' parameters to g:createLink.
Metadata: RegistrationInfo: honour minimal and ext

Honour the minimal and ext (RoleExtensions) flags in the code generation
the Registration Info (RPI) extensions.  I.e., specifically, do not
generate this extension if either minimal is set OR roleExtensions is
not set.

Also pass these parameters to the populateSchema() method so that the
schema definition gets added ONLY if the RPI extension would be actually
generated.
Merge pull request #161 from University-of-Auckland/develop-fix-causage

Minor fixes mostly around certificates
MetadataGenerationService: clean up reginfo code

Clean up the Registration and Publishing Information extension to the
MetadataGenerationService as per comments by @braddleybeddoes in #157 -
specifically:
* use "x && !x.isEmpty()" to test if a string is set to a non-empty value
* correctly reference local variables instead of the fields in config
* drop unnecessary explicit "return" in front of the return value
  in the populateSchema function
MetadataGenerationService: refer to RPI XSD

Add the reference to the Registration and Publishing Info XSD in the
generated metadata (if the RPI namespace is actually used).

The XSD file itself can be downloaded from
http://docs.oasis-open.org/security/saml/Post2.0/saml-metadata-rpi/v1.0/cs01/xsd/saml-metadata-rpi-v1.0.xsd
- and it is the responsibility of interested parties to deploy the XSD
locally to validate the mdrpi extensions.

Adjust the test-case data accordingly.
Merge pull request #157 from University-of-Auckland/develop-metadata-rpi

Metadata: Add support for Registration Information