I'm working on a project that needs to plugin to the AuthenticationFlow and invoke a webservice that requires mutual authentication. This would be server peer authentication, not client authentication. Within the admin console, I would like the plugin to allow someone to upload a trusted CA certificate (in the event the target server is using something like an Active Directory Domain CA) and a client certificate key pair for the Keycloak server signed by the same CA.
I have added the FILE_TYPE to my configuration properties, but when I navigate to the config screen within the execution, the label is present, but not the form field.
As an alternative, I can use text fields and paste the certificate hashes. That would require a few extra lines of code and not quite as user friendly, but will go that route if necessary.
Below is my ProviderConfigProperty and the resulting HTML. Is the code below incomplete? Is there an additional model or interface I need to implement before FILE_TYPE will work? Is FILE_TYPE an "in-progress" feature?
ProviderConfigProperty trustedCertificate = new ProviderConfigProperty();
trustedCertificate.setType(ProviderConfigProperty.FILE_TYPE);
trustedCertificate.setName("trustedCertificate");
trustedCertificate.setLabel("Trusted Certificate");
trustedCertificate.setHelpText("Certificate identifying the target server, or trusted CA.");
trustedCertificate.setDefaultValue(null);
configProperties.add(trustedCertificate);
<div data-ng-repeat="option in properties" class="form-group ng-scope" data-ng-controller="ProviderConfigCtrl">
<label class="col-md-2 control-label ng-binding ng-scope">Trusted Certificate <i class="fa fa-question-circle text-muted ng-scope" tooltip="Certificate identifying the target server, or target server's CA as a trusted identity." tooltip-placement="right" tooltip-trigger="mouseover mouseout"></i></label>
<!-- ngIf: option.type == 'String' -->
<!-- ngIf: option.type == 'Password' -->
<!-- ngIf: option.type == 'boolean' -->
<!-- ngIf: option.type == 'List' -->
<!-- ngIf: option.type == 'Role' -->
<!-- ngIf: option.type == 'ClientList' -->
<!-- ngIf: option.type == 'Script' -->
<!-- ngIf: option.type == 'MultivaluedString' -->
<!-- ngIf: option.type == 'Text' -->
<!-- ngIf: option.type == 'Map' -->
<kc-tooltip class="hidden"></kc-tooltip>
</div>
Best Regards,
Jason