We will build a subject source configuration wizard.

Here is a video discussion of converting over a JDBC subject source (legacy) to the configuration wizard format

Configuration changes

The configuration of a subject source configuration needs a facelift since features were gradually added, and now can use a re-orgnization.

The current format of configuration will not be editable by the wizard.  The new format and current format will co-exist until 2.6 where the new format must be used.

Its possible that we can have a conversion utility from old to new.

The configuration changes facilitate leveraging wizard-code from provisioning, and having a similar user experience as provisioning (e.g. how attributes are configured).

We will have new source adapter subclasses to separate the new vs old.

Configuration

Configuration is in the subject.properties

configs are in the format:

subjectApi.source.<configId>.configItemSuffix = value

If the source is GrouperSourceAdapter, EntitySourceAdapter or InternalSourceAdapter or id = "grouperExternal", then internal and not editable. 

Config itemConfig typeDescriptionNotes
General subsection
adapterClassgenericdrop down, ldap or jdbcOnly LdapSourceAdapter2_5 and JDBCSourceAdapter2_5 are supported (new subclasses of LdapSourceAdapter and JDBCSourceAdapter2)
idgenericsource idid of the source (required)
namegenericsource namename of the source (required)
enabledgenerictrue/falsedefault true.  If false, the source will not be loaded on startup.  Either way source is editable and can do diagnostics 
typesgenericdropdownperson or application, single select (required)
ldapExternalSystemConfigIdldapdropdownshown on ldap config screen (required)
sqlExternalSystemConfigIdsqldropdownshown on sql config screen (required)
findResultSizegenericjust get this number of resultsif doing a find query (default 100)
extraAttributesFromSourcegenericsource attribute names to be retrieved, not listed belowif there is a SQL col, or LDAP attribute not listed below in attribute.0.sourceAttribute, to be retrieved, list here, string multiple, comma separated.  i.e. these are only used in translations
numberOfAttributesgenericdropdown between 1-30free-form.  (required)
Attribute subsection (subsection per attribute like provisioning)  Configure attributes in order of processing (virtual last)
attribute.0.namegenericattribute nametextfield (required)
attribute.0.formatToLowerCasegenerictrue/false
attribute.0.isTranslationgenerictrue/falseif false then simple attribute from source (column or attribute), or a jexl script if true
attribute.0.sourceAttributegeneric

textfield

show if not isTranslation

name of a column or attribute from source to use for this subject attribute.  e.g. email_address would be the email_address column

mutually exclusive with translation (required)

attribute.0.translation generic

textfield

show if isTranslation

we need variables from source, and variables for other subject attributes.  suggestion is (required).  Note, all lower case

  • ${source_attribute__first_name} - gets an attribute from the source query or filter.  in this case 'first_name' column
  • ${subject_attribute__emailaddress} - references a previously configured subject attribute.  in this case "emailaddress"
attribute.0.emailAttributegenerictrue/falseonly one attribute can be marked true
attribute.0.subjectIdentifiergenerictrue/falsemultiple could be marked true
attribute.0.internalgenerictrue/falseif should be exposed as subject attribute or kept internal
attribute.0.multiValuedgenerictrue/false
Subject field attribute mapping
subject id from attribute namegenericdrop downthe attribute which is the subject id (required)
subject name from attribute namegenericdrop downthe attribute which is the subject name (required)
subject description from attribute namegenericdrop downthe attribute which is the subject description (required)
Search attribute subsection
searchAttributeCountgenericdrop down 1-5(required)
searchAttribute.0.attributeNamegenericdropdown with all source attribute namesshow if searchAttribute.0.valueType is attribute (required)
Sort attribute subsection
sortAttributeCountgenericdrop down 1-5(required)
sortAttribute.0.attributeNamegenericdropdown with all source attribute namesshow if sortAttribute.0.valueType is attribute (required)
Ldap settings subsection (ldap only)
ldapSearchSubjectByIdFilterldaptextfield%TERM% in filter.  Note, this can be automatic if blank
ldapSearchSubjectByIdScopeldapdrop downdefault SUBTREE_SCOPE if blank
ldapSearchSubjectByIdBaseDnldaptextfieldbase DN to search (required)
ldapSearchSubjectByIdentifierFilterldaptextfield%TERM% in filter.  Note, this can be automatic if blank
ldapSearchSubjectByIdentifierScopeldapdrop downdefault SUBTREE_SCOPE if blank
ldapSearchSubjectByIdentifierBaseDnldaptextfieldbase DN to search (required)
ldapFindSubjectsFilterldaptextfield%TERM% in filter.   (required)
ldapFindSubjectsScopeldapdrop downdefault SUBTREE_SCOPE if blank
ldapFindSubjectsBaseDnldaptextfieldbase DN to search (required)
SQL settings subsection
dbTableOrViewsqltextfield, table namecould be prefixed by schema is not in connecting schema (required)
Diagnostics subsection
diagnosticsDefaultSubjectIdgenerictextfieldsubject id that exists in the source.  If entered this will be prepopulated in the diagnostics screen (if nothing entered use the current default).  default value: someSubjectId
diagnosticsDefaultSubjectIdentifiergenerictextfieldsubject id that exists in the source.  If entered this will be prepopulated in the diagnostics screen (if nothing entered use the current default). default value: someSubjectIdentifier
diagnosticsDefaultSearchScreengenerictextfieldsearch string that finds some results in the source.  If entered this will be prepopulated in the diagnostics screen (if nothing entered use the current default).  default value: first last
Status settings subsection

param.findSubjectByIdOnCheckConfig.value

genericboolean (radio or whatever)if this source should do a findById when the status of Grouper is checked e.g. in the status servlet (default true)

param.subjectIdToFindOnCheckConfig.value

generictextfieldshow if param.findSubjectByIdOnCheckConfig.value is true.  This is the subjectId to check on status of Grouper.  default value: grouperTestSubjectByIdOnStartupASDFGHJ
param.findSubjectByIdentifiedOnCheckConfig.value (note leave this misspelled)genericboolean (radio or whatever)if this source should do a findByIdentifier when the status of Grouper is checked e.g. in the status servlet
param.subjectIdentifierToFindOnCheckConfig.valuegenerictextfieldshow if param.findSubjectByIdentifiedOnCheckConfig.value is true.  This is the subjectIdentifier to check on status of Grouper.  default value:  grouperTestSubjectByIdentifierOnStartupASDFGHJ
param.findSubjectByStringOnCheckConfig.valuegenericboolean (radio or whatever)if this source should do a findByIdentifier when the status of Grouper is checked e.g. in the status servlet
param.stringToFindOnCheckConfig.valuegenerictextfieldshow if param.findSubjectByStringOnCheckConfig.value is true.  This is the search string to check on status of Grouper.  Shouldnt return too many results for performance reasons.  default value: grouperTestStringOnStartupASDFGHJ

To do (pre 2.6)

  1. Validation when saving
  2. View only
  3. Breadcrumbs (view only is main for subject source)
  4. Generate the new config from the old
  5. Look at other configs (grouper.properties, grouper-ui.properties, grouper-ws.properties), collate subject source configuration, and move to this wizard (as override)
  6. Overall subject source config