added webapp authenticator component

master
Amalka Subasinghe 4 years ago
parent 0162753d6a
commit af2f8155e5

@ -63,13 +63,13 @@
javax.xml.bind.annotation, javax.xml.bind.annotation,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
javax.xml.validation, javax.xml.validation,
org.apache.catalina, <!--org.apache.catalina,-->
org.apache.catalina.connector, <!--org.apache.catalina.connector,-->
org.apache.catalina.util, <!--org.apache.catalina.util,-->
org.apache.commons.logging, org.apache.commons.logging,
org.apache.coyote, <!--org.apache.coyote,-->
org.apache.tomcat.util.buf, <!--org.apache.tomcat.util.buf,-->
org.apache.tomcat.util.http, <!--org.apache.tomcat.util.http,-->
org.osgi.service.component, org.osgi.service.component,
org.osgi.framework, org.osgi.framework,
org.w3c.dom, org.w3c.dom,
@ -106,7 +106,7 @@
org.apache.commons.pool.impl, org.apache.commons.pool.impl,
org.apache.http.conn, org.apache.http.conn,
org.apache.http.impl.conn, org.apache.http.impl.conn,
javax.xml.soap; version="${javax.xml.soap.imp.pkg.version}", <!--javax.xml.soap; version="${javax.xml.soap.imp.pkg.version}",-->
javax.xml.stream, javax.xml.stream,
org.apache.axiom.*; version="${axiom.osgi.version.range}", org.apache.axiom.*; version="${axiom.osgi.version.range}",
org.wso2.carbon.registry.core.*, org.wso2.carbon.registry.core.*,

@ -0,0 +1,118 @@
<WebappAuthenticatorConfig>
<Authenticators>
<Authenticator>
<Name>OAuth</Name>
{% if webapp_auth_conf.authenticator.oauth is defined %}
<ClassName>{{webapp_auth_conf.authenticator.oauth.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in webapp_auth_conf.authenticator.oauth.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
{% else %}
<ClassName>org.wso2.carbon.webapp.authenticator.framework.authenticator.OAuthAuthenticator</ClassName>
<Parameters>
<Parameter Name="IsRemote">false</Parameter>
<Parameter Name="TokenValidationEndpointUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</Parameter>
<Parameter Name="Username">admin</Parameter>
<Parameter Name="Password">admin</Parameter>
<Parameter Name="MaxTotalConnections">100</Parameter>
<Parameter Name="MaxConnectionsPerHost">100</Parameter>
</Parameters>
{% endif %}
</Authenticator>
<Authenticator>
<Name>BasicAuth</Name>
{% if webapp_auth_conf.authenticator.basic_auth is defined %}
<ClassName>{{webapp_auth_conf.authenticator.basic_auth.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in webapp_auth_conf.authenticator.basic_auth.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
{% else %}
<ClassName>org.wso2.carbon.webapp.authenticator.framework.authenticator.BasicAuthAuthenticator</ClassName>
{% endif %}
</Authenticator>
<Authenticator>
<Name>JWT</Name>
{% if webapp_auth_conf.authenticator.jwt is defined %}
<ClassName>{{webapp_auth_conf.authenticator.jwt.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in webapp_auth_conf.authenticator.jwt.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
{% else %}
<ClassName>org.wso2.carbon.webapp.authenticator.framework.authenticator.JWTAuthenticator</ClassName>
<Parameters>
<!--Issuers list and corresponding cert alias-->
<Parameter Name="default">wso2carbon</Parameter>
<Parameter Name="wso2.org/products/am">wso2carbon</Parameter>
<Parameter Name="wso2.org/products/iot">wso2carbon</Parameter>
<Parameter Name="wso2.org/products/analytics">wso2carbon</Parameter>
</Parameters>
{% endif %}
</Authenticator>
<Authenticator>
<Name>CertificateAuth</Name>
{% if webapp_auth_conf.authenticator.certificate_auth is defined %}
<ClassName>{{webapp_auth_conf.authenticator.certificate_auth.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in webapp_auth_conf.authenticator.certificate_auth.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
{% else %}
<ClassName>org.wso2.carbon.webapp.authenticator.framework.authenticator.CertificateAuthenticator</ClassName>
{% endif %}
</Authenticator>
<Authenticator>
<Name>OTPAuth</Name>
{% if webapp_auth_conf.authenticator.otpauth is defined %}
<ClassName>{{webapp_auth_conf.authenticator.otpauth.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in webapp_auth_conf.authenticator.otpauth.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
{% else %}
<ClassName>org.wso2.carbon.webapp.authenticator.framework.authenticator.OneTimeTokenAuthenticator</ClassName>
{% endif %}
</Authenticator>
<Authenticator>
<Name>BST</Name>
{% if webapp_auth_conf.authenticator.bst is defined %}
<ClassName>{{webapp_auth_conf.authenticator.bst.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in webapp_auth_conf.authenticator.bst.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
{% else %}
<ClassName>org.wso2.carbon.webapp.authenticator.framework.authenticator.BSTAuthenticator</ClassName>
<Parameters>
<Parameter Name="IsRemote">false</Parameter>
<Parameter Name="TokenValidationEndpointUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</Parameter>
<Parameter Name="Username">admin</Parameter>
<Parameter Name="Password">admin</Parameter>
<Parameter Name="MaxTotalConnections">100</Parameter>
<Parameter Name="MaxConnectionsPerHost">100</Parameter>
</Parameters>
{% endif %}
</Authenticator>
{% if webapp_auth_conf.authenticators is defined %}
{%- for authenticator in webapp_auth_conf.authenticators -%}
<Authenticator>
<Name>{{authenticator.name}}</Name>
<ClassName>{{authenticator.class_name}}</ClassName>
<Parameters>
{% for property_name,property_value in authenticator.parameter_options.items() %}
<Parameter Name="{{property_name}}">{{property_value}}</Parameter>
{% endfor %}
</Parameters>
</Authenticator>
{% endfor %}
{% endif %}
</Authenticators>
</WebappAuthenticatorConfig>

@ -1,2 +1,3 @@
instructions.configure = \ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.webapp.authenticator.framework.server_${feature.version}/conf/webapp-authenticator-config.xml,target:${installFolder}/../../conf/etc/webapp-authenticator-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.webapp.authenticator.framework.server_${feature.version}/conf/webapp-authenticator-config.xml,target:${installFolder}/../../conf/etc/webapp-authenticator-config.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.webapp.authenticator.framework.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\

@ -44,6 +44,7 @@
<module>components/certificate-mgt</module> <module>components/certificate-mgt</module>
<module>components/ui-request-interceptor</module> <module>components/ui-request-interceptor</module>
<module>components/transport-mgt</module> <module>components/transport-mgt</module>
<module>components/webapp-authenticator-framework</module>
<module>features/device-mgt</module> <module>features/device-mgt</module>
<module>features/apimgt-extensions</module> <module>features/apimgt-extensions</module>
<module>features/application-mgt</module> <module>features/application-mgt</module>
@ -54,6 +55,7 @@
<module>features/jwt-client</module> <module>features/jwt-client</module>
<module>features/device-mgt-extensions</module> <module>features/device-mgt-extensions</module>
<module>features/transport-mgt</module> <module>features/transport-mgt</module>
<module>features/webapp-authenticator-framework</module>
</modules> </modules>
<dependencyManagement> <dependencyManagement>

Loading…
Cancel
Save