http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/XMLEditorPanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/XMLEditorPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/XMLEditorPanel.html new file mode 100644 index 0000000..e42c0f7 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/XMLEditorPanel.html @@ -0,0 +1,54 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> + <wicket:head> + <link rel="stylesheet" type="text/css" href="webjars/codemirror/${codemirror.version}/lib/codemirror.css"/> + + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/lib/codemirror.js"></script> + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/mode/xml/xml.js"></script> + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/display/autorefresh.js"></script> + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/search/search.js"></script> + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/search/searchcursor.js"></script> + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/edit/matchbrackets.js"></script> + <script type="text/javascript" src="webjars/codemirror/${codemirror.version}/addon/edit/closebrackets.js"></script> + <script type="text/javascript"> + function updateTextArea(editor) { + document.getElementById("xmlEditorInfoDefForm").children["xmlEditorInfo"].value = editor.getValue(); + } + </script> + <style> + .w_content_3 { + padding: 0; + color: #333333; + font-family: Verdana,Tahoma,sans-serif; + font-size: 100%; + border: 1px solid #BBBBBB; + padding: 1%; + } + </style> + </wicket:head> + <wicket:panel> + <div style="padding: 1%;"> + <div class="w_content_3" id="xmlEditorInfoDefForm"> + <textarea wicket:id="xmlEditorInfo" id="consoleLayoutInfo" name="xmlEditorInfo" style="width: 100%; height: 350px;"> + </textarea> + </div> + </div> + </wicket:panel> +</html> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html new file mode 100644 index 0000000..ddca6f7 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html @@ -0,0 +1,96 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> + <head><title></title></head> + <body> + <wicket:panel> + <div class="table-responsive no-padding"> + <table id="mappings" + class="table table-hover" + style="font-size: 1em;margin-top:2px;" + wicket:id="mappingContainer"> + <tbody> + <tr> + <th> + <wicket:message key="intAttrName"/> + <span id="intAttrNameInfo" wicket:id="intAttrNameInfo" class="glyphicon glyphicon-info-sign"></span> + </th> + <th><wicket:message key="extAttrName"/></th> + <th><i class="fa fa-repeat"></i></th> + <th><i class="fa fa-magic"></i></th> + <th> + <wicket:message key="mandatoryCondition"/> + <span id="jexlInfo" wicket:id="jexlInfo" class="glyphicon glyphicon-info-sign"></span> + </th> + <th><wicket:message key="connObjectKey"/></th> + <th><label wicket:id="passwordLabel"/></th> + <th><label wicket:id="purposeLabel"/></th> + <th></th> + </tr> + <tr wicket:id="mappings"> + <td> + <span wicket:id="intAttrName">[intAttrNames]</span> + </td> + <td> + <span wicket:id="extAttrName">[extAttrName]</span> + </td> + <td> + <div class="alert-widget dropdown tasks-menu"> + <span wicket:id="jexlTransformers">[JEXL Transformers]</span> + </div> + </td> + <td> + <div class="alert-widget dropdown tasks-menu"> + <span wicket:id="mappingItemTransformers">[Mapping Item Transformers]</span> + </div> + </td> + <td> + <span wicket:id="mandatoryCondition">[mandatoryCondition]</span> + </td> + <td> + <span wicket:id="connObjectKey">[connObjectKey]</span> + </td> + <td> + <span wicket:id="password">[password]</span> + </td> + <td> + <div wicket:id="purpose" style="margin: 10px 0px 10px 0px"> + <span wicket:id="purposeActions">[purpose]</span> + </div> + </td> + <td> + <div> + <span wicket:id="toRemove"/> + </div> + </td> + </tr> + </tbody> + + <tfoot> + <tr> + <td colspan="10" style="padding: 5px; text-align: right"> + <input type="submit" class="btn btn-primary" wicket:id="addMappingBtn" /> + </td> + </tr> + </tfoot> + </table> + </div> + </wicket:panel> + </body> +</html> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.properties new file mode 100644 index 0000000..0f1691d --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +extAttrName=External attribute +connObjectKey=Remote Key +mandatoryCondition=Mandatory +password=Password +purpose=Purpose +delete=Delete +intAttrName=Internal attribute +enforceMandatoryCondition=Enforce mandatory condition http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_it.properties new file mode 100644 index 0000000..cf01280 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_it.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +extAttrName=Attributo esterno +connObjectKey=Chiave remota +mandatoryCondition=Obbligatorio +password=Password +purpose=Scopo +delete=Rimuovi +intAttrName=Attributo interno +enforceMandatoryCondition=Abilita mandatory condition http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_pt_BR.properties new file mode 100644 index 0000000..33f66a5 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_pt_BR.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +extAttrName=Atributo Externo +connObjectKey=Remote Key +mandatoryCondition=Obrigat\u00f3rio +password=Senha +purpose=Prop\u00f3sito +delete=Excluir +intAttrName=Atributo interno +enforceMandatoryCondition=Aplicar condi\u00e7\u00e3o obrigat\u00f3ria http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_ru.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_ru.properties new file mode 100644 index 0000000..1f4c277 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel_ru.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +extAttrName=\u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b +connObjectKey=\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 +mandatoryCondition=\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 +password=\u041f\u0430\u0440\u043e\u043b\u044c +purpose=\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 +delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c +intAttrName=\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b +enforceMandatoryCondition=\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 (\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e) http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping.properties deleted file mode 100644 index 99d1add..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -mapping.title=Mapping -mapping.summary= - http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_it.properties deleted file mode 100644 index fde5de0..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_it.properties +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -mapping.title=Mapping -mapping.summary= http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_pt_BR.properties deleted file mode 100644 index 99d1add..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ProvisionWizardBuilder$Mapping_pt_BR.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -mapping.title=Mapping -mapping.summary= - http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.html deleted file mode 100644 index ea3ddc4..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.html +++ /dev/null @@ -1,96 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> - <head><title></title></head> - <body> - <wicket:panel> - <div class="table-responsive no-padding"> - <table id="mappings" - class="table table-hover" - style="font-size: 1em;margin-top:2px;" - wicket:id="mappingContainer"> - <tbody> - <tr> - <th> - <wicket:message key="intAttrName"/> - <span id="intAttrNameInfo" wicket:id="intAttrNameInfo" class="glyphicon glyphicon-info-sign"></span> - </th> - <th><wicket:message key="extAttrName"/></th> - <th><i class="fa fa-repeat"></i></th> - <th><i class="fa fa-magic"></i></th> - <th> - <wicket:message key="mandatoryCondition"/> - <span id="jexlInfo" wicket:id="jexlInfo" class="glyphicon glyphicon-info-sign"></span> - </th> - <th><wicket:message key="connObjectKey"/></th> - <th><label wicket:id="passwordLabel"/></th> - <th><wicket:message key="purpose"/></th> - <th></th> - </tr> - <tr wicket:id="mappings"> - <td> - <span wicket:id="intAttrName">[intAttrNames]</span> - </td> - <td> - <span wicket:id="extAttrName">[extAttrName]</span> - </td> - <td> - <div class="alert-widget dropdown tasks-menu"> - <span wicket:id="jexlTransformers">[JEXL Transformers]</span> - </div> - </td> - <td> - <div class="alert-widget dropdown tasks-menu"> - <span wicket:id="mappingItemTransformers">[Mapping Item Transformers]</span> - </div> - </td> - <td> - <span wicket:id="mandatoryCondition">[mandatoryCondition]</span> - </td> - <td> - <span wicket:id="connObjectKey">[connObjectKey]</span> - </td> - <td> - <span wicket:id="password">[password]</span> - </td> - <td> - <div wicket:id="purpose" style="margin: 10px 0px 10px 0px"> - <span wicket:id="purposeActions">[purpose]</span> - </div> - </td> - <td> - <div> - <span wicket:id="toRemove"/> - </div> - </td> - </tr> - </tbody> - - <tfoot> - <tr> - <td colspan="10" style="padding: 5px; text-align: right"> - <input type="submit" class="btn btn-primary" wicket:id="addMappingBtn" /> - </td> - </tr> - </tfoot> - </table> - </div> - </wicket:panel> - </body> -</html> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.properties index 862627a..a50917d 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.properties @@ -16,22 +16,9 @@ # under the License. anyType=Object Type objectClass= Object Class -__ACCOUNT__=ACCOUNT -__GROUP__=GROUP auxClasses=Auxiliary Classes extAttrName=External attribute -entity=Entity -groupSchema=Role Schema -connObjectKey=Remote Key -transformers=Item Transformers -mandatoryCondition=Mandatory -password=Password -purpose=Purpose -delete=Delete -intAttrName=Internal attribute -enforceMandatoryCondition=Enforce mandatory condition -fieldName=Field name connObjectKeyValidation=There must be exactly one Remote Key propagationMode=Propagation mode http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_it.properties index f388910..6e7dac6 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_it.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_it.properties @@ -16,22 +16,9 @@ # under the License. anyType=Tipo oggetto objectClass=Classe -__ACCOUNT__=ACCOUNT -__GROUP__=GROUP auxClasses=Classi Ausiliarie extAttrName=Attributo esterno -entity=Entità -groupSchema=Schema Ruolo -connObjectKey=Chiave remota -transformers=Item Transformers -mandatoryCondition=Obbligatorio -password=Password -purpose=Scopo -delete=Rimuovi -intAttrName=Attributo interno -enforceMandatoryCondition=Abilita mandatory condition -fieldName=Nome campo connObjectKeyValidation=Deve essere definito esattamente una Chiave remota propagationMode=Modalit\u00e0 di propagazione http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_pt_BR.properties index 856a378..bdd9e92 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_pt_BR.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_pt_BR.properties @@ -16,22 +16,9 @@ # under the License. anyType=Object Type objectClass=Classe -__ACCOUNT__=ACCOUNT -__GROUP__=GROUP auxClasses=Classes Auxiliares extAttrName=Atributo Externo -entity=Entidade -groupSchema=Esquema de Fun\u00e7\u00e3o -connObjectKey=Remote Key -transformers=Item Transformers -mandatoryCondition=Obrigat\u00f3rio -password=Senha -purpose=Prop\u00f3sito -delete=Excluir -intAttrName=Atributo interno -enforceMandatoryCondition=Aplicar condi\u00e7\u00e3o obrigat\u00f3ria -fieldName=Nome do Campo connObjectKeyValidation=Precisa ser exatamente um Remote Key propagationMode=Modo de propaga\u00e7\u00e3o http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_ru.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_ru.properties index 142ff17..b06c382 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_ru.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel_ru.properties @@ -14,25 +14,11 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - anyType=\u0422\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 objectClass=\u041a\u043b\u0430\u0441\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 -__ACCOUNT__=\u0423\u0427\u0415\u0422\u041d\u0410\u042f \u0417\u0410\u041f\u0418\u0421\u042c -__GROUP__=\u0413\u0420\u0423\u041f\u041f\u0410 auxClasses=\u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 extAttrName=\u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b -entity=\u041e\u0431\u044a\u0435\u043a\u0442 -groupSchema=\u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0433\u0440\u0443\u043f\u043f\u044b -connObjectKey=\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 -transformers=\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 -mandatoryCondition=\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 -password=\u041f\u0430\u0440\u043e\u043b\u044c -purpose=\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 -delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c -intAttrName=\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b -enforceMandatoryCondition=\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 (\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e) -fieldName=\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044f connObjectKeyValidation=\u0422\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u0438\u043d \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 propagationMode=\u0420\u0435\u0436\u0438\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/client-console/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/client-console/pom.xml b/ext/camel/client-console/pom.xml index 5fdbaeb..1b7c89c 100644 --- a/ext/camel/client-console/pom.xml +++ b/ext/camel/client-console/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Client Console</name> - <description>Apache Syncope Extensions: Camel Client Console</description> + <name>Apache Syncope Ext: Camel Client Console</name> + <description>Apache Syncope Ext: Camel Client Console</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-client-console</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java ---------------------------------------------------------------------- diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java index ac3c2aa..70e523d 100644 --- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java +++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java @@ -27,9 +27,7 @@ import org.apache.syncope.common.lib.to.CamelMetrics; import org.apache.syncope.common.lib.to.CamelRouteTO; import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.rest.api.service.CamelRouteService; -import org.springframework.stereotype.Component; -@Component public class CamelRoutesRestClient extends BaseRestClient { private static final long serialVersionUID = -2018208424159468912L; http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/common-lib/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/common-lib/pom.xml b/ext/camel/common-lib/pom.xml index 88d98dc..8b6aab4 100644 --- a/ext/camel/common-lib/pom.xml +++ b/ext/camel/common-lib/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Common Lib</name> - <description>Apache Syncope Extensions: Camel Common Lib</description> + <name>Apache Syncope Ext: Camel Common Lib</name> + <description>Apache Syncope Ext: Camel Common Lib</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-common-lib</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/logic/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/logic/pom.xml b/ext/camel/logic/pom.xml index 71bcd3e..dfa43ff 100644 --- a/ext/camel/logic/pom.xml +++ b/ext/camel/logic/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Logic</name> - <description>Apache Syncope Extensions: Camel Logic</description> + <name>Apache Syncope Ext: Camel Logic</name> + <description>Apache Syncope Ext: Camel Logic</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-logic</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/persistence-api/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/persistence-api/pom.xml b/ext/camel/persistence-api/pom.xml index 92efa33..0828c6c 100644 --- a/ext/camel/persistence-api/pom.xml +++ b/ext/camel/persistence-api/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Persistence API</name> - <description>Apache Syncope Extensions: Camel Persistence API</description> + <name>Apache Syncope Ext: Camel Persistence API</name> + <description>Apache Syncope Ext: Camel Persistence API</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-persistence-api</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/persistence-jpa/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/persistence-jpa/pom.xml b/ext/camel/persistence-jpa/pom.xml index bdfd1d4..6f372e9 100644 --- a/ext/camel/persistence-jpa/pom.xml +++ b/ext/camel/persistence-jpa/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Persistence JPA</name> - <description>Apache Syncope Extensions: Camel Persistence JPA</description> + <name>Apache Syncope Ext: Camel Persistence JPA</name> + <description>Apache Syncope Ext: Camel Persistence JPA</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-persistence-jpa</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/pom.xml b/ext/camel/pom.xml index 7afdc91..3ce7758 100644 --- a/ext/camel/pom.xml +++ b/ext/camel/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel</name> - <description>Apache Syncope Extensions: Camel</description> + <name>Apache Syncope Ext: Camel</name> + <description>Apache Syncope Ext: Camel</description> <groupId>org.apache.syncope.ext</groupId> <artifactId>syncope-ext-camel</artifactId> <packaging>pom</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/provisioning-api/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/provisioning-api/pom.xml b/ext/camel/provisioning-api/pom.xml index 570a597..effa522 100644 --- a/ext/camel/provisioning-api/pom.xml +++ b/ext/camel/provisioning-api/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Provisioning API</name> - <description>Apache Syncope Extensions: Camel Provisioning API</description> + <name>Apache Syncope Ext: Camel Provisioning API</name> + <description>Apache Syncope Ext: Camel Provisioning API</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-provisioning-api</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/provisioning-camel/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/provisioning-camel/pom.xml b/ext/camel/provisioning-camel/pom.xml index e9d8e0a..19e31cd 100644 --- a/ext/camel/provisioning-camel/pom.xml +++ b/ext/camel/provisioning-camel/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel Provisioning</name> - <description>Apache Syncope Extensions: Camel Provisioning</description> + <name>Apache Syncope Ext: Camel Provisioning</name> + <description>Apache Syncope Ext: Camel Provisioning</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-provisioning</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/rest-api/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/rest-api/pom.xml b/ext/camel/rest-api/pom.xml index 1d09df2..658ce14 100644 --- a/ext/camel/rest-api/pom.xml +++ b/ext/camel/rest-api/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel REST API</name> - <description>Apache Syncope Extensions: Camel REST API</description> + <name>Apache Syncope Ext: Camel REST API</name> + <description>Apache Syncope Ext: Camel REST API</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-rest-api</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/camel/rest-cxf/pom.xml ---------------------------------------------------------------------- diff --git a/ext/camel/rest-cxf/pom.xml b/ext/camel/rest-cxf/pom.xml index 35043f6..d5b73fd 100644 --- a/ext/camel/rest-cxf/pom.xml +++ b/ext/camel/rest-cxf/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: Camel REST CXF</name> - <description>Apache Syncope Extensions: Camel REST CXF</description> + <name>Apache Syncope Ext: Camel REST CXF</name> + <description>Apache Syncope Ext: Camel REST CXF</description> <groupId>org.apache.syncope.ext.camel</groupId> <artifactId>syncope-ext-camel-rest-cxf</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/pom.xml ---------------------------------------------------------------------- diff --git a/ext/pom.xml b/ext/pom.xml index 156fc1c..f832188 100644 --- a/ext/pom.xml +++ b/ext/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions</name> - <description>Apache Syncope Extensions</description> + <name>Apache Syncope Ext</name> + <description>Apache Syncope Ext</description> <groupId>org.apache.syncope</groupId> <artifactId>syncope-ext</artifactId> <packaging>pom</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/agent/pom.xml ---------------------------------------------------------------------- diff --git a/ext/saml2sp/agent/pom.xml b/ext/saml2sp/agent/pom.xml index 532f760..a72d507 100644 --- a/ext/saml2sp/agent/pom.xml +++ b/ext/saml2sp/agent/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.1.0-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: SAML 2.0 SP Agent</name> - <description>Apache Syncope Extensions: SAML 2.0 SP Agent</description> + <name>Apache Syncope Ext: SAML2 SP Agent</name> + <description>Apache Syncope Ext: SAML2 SP Agent</description> <groupId>org.apache.syncope.ext.saml2sp</groupId> <artifactId>syncope-ext-saml2sp-agent</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/pom.xml ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/pom.xml b/ext/saml2sp/client-console/pom.xml index cf533a6..a9e2934 100644 --- a/ext/saml2sp/client-console/pom.xml +++ b/ext/saml2sp/client-console/pom.xml @@ -27,8 +27,8 @@ under the License. <version>2.0.3-SNAPSHOT</version> </parent> - <name>Apache Syncope Extensions: SAML 2.0 SP Client Console</name> - <description>Apache Syncope Extensions: SAML 2.0 SP Client Console</description> + <name>Apache Syncope Ext: SAML2 SP Client Console</name> + <description>Apache Syncope Ext: SAML2 SP Client Console</description> <groupId>org.apache.syncope.ext.saml2sp</groupId> <artifactId>syncope-ext-saml2sp-client-console</artifactId> <packaging>jar</packaging> http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP.java new file mode 100644 index 0000000..8399ff0 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.pages; + +import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel; +import java.util.ArrayList; +import java.util.List; +import org.apache.syncope.client.console.BookmarkablePageLinkBuilder; +import org.apache.syncope.client.console.annotations.ExtPage; +import org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel; +import org.apache.syncope.client.console.panels.SAML2SPPanel; +import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; +import org.apache.wicket.extensions.markup.html.tabs.ITab; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.markup.html.panel.Panel; +import org.apache.wicket.model.ResourceModel; +import org.apache.wicket.request.mapper.parameter.PageParameters; + +@ExtPage(label = "SAML 2.0 SP", icon = "fa-sign-in", listEntitlement = "", priority = 100) +public class SAML2SP extends BaseExtPage { + + private static final long serialVersionUID = -4837201407211278956L; + + public SAML2SP(final PageParameters parameters) { + super(parameters); + + body.add(BookmarkablePageLinkBuilder.build("dashboard", "dashboardBr", Dashboard.class)); + + WebMarkupContainer content = new WebMarkupContainer("content"); + content.setOutputMarkupId(true); + content.add(new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList())); + body.add(content); + } + + private List<ITab> buildTabList() { + + final List<ITab> tabs = new ArrayList<>(2); + + tabs.add(new AbstractTab(new ResourceModel("idps")) { + + private static final long serialVersionUID = -6815067322125799251L; + + @Override + public Panel getPanel(final String panelId) { + return new SAML2IdPsDirectoryPanel(panelId, getPageReference()); + } + }); + + tabs.add(new AbstractTab(new ResourceModel("sp")) { + + private static final long serialVersionUID = -6815067322125799251L; + + @Override + public Panel getPanel(final String panelId) { + return new SAML2SPPanel(panelId); + } + }); + + return tabs; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/ImportMetadata.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/ImportMetadata.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/ImportMetadata.java new file mode 100644 index 0000000..52a05a6 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/ImportMetadata.java @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.panels; + +import static org.apache.syncope.client.console.panels.TogglePanel.LOG; + +import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.fileinput.BootstrapFileInputField; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.fileinput.FileInputConfig; +import java.io.ByteArrayInputStream; +import java.io.Serializable; +import java.util.ArrayList; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.commons.Constants; +import org.apache.syncope.client.console.pages.BasePage; +import org.apache.syncope.client.console.rest.SAML2IdPsRestClient; +import org.apache.wicket.PageReference; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior; +import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.markup.html.form.Form; +import org.apache.wicket.markup.html.form.upload.FileUpload; +import org.apache.wicket.model.Model; +import org.apache.wicket.model.util.ListModel; + +public class ImportMetadata extends TogglePanel<Serializable> { + + private static final long serialVersionUID = 6959177759869415782L; + + private final SAML2IdPsRestClient restClient = new SAML2IdPsRestClient(); + + private final Form<?> form; + + public ImportMetadata(final String id, final WebMarkupContainer container, final PageReference pageRef) { + super(id, pageRef); + + form = new Form<>("metadataForm"); + addInnerObject(form); + + final Model<byte[]> metadata = new Model<>(); + + FileInputConfig config = new FileInputConfig(); + config.showUpload(false); + config.showRemove(false); + config.showPreview(false); + final BootstrapFileInputField fileUpload = + new BootstrapFileInputField("fileUpload", new ListModel<>(new ArrayList<FileUpload>()), config); + fileUpload.setOutputMarkupId(true); + fileUpload.add(new AjaxFormSubmitBehavior(Constants.ON_CHANGE) { + + private static final long serialVersionUID = 5538299138211283825L; + + @Override + protected void onSubmit(final AjaxRequestTarget target) { + FileUpload uploadedFile = fileUpload.getFileUpload(); + if (uploadedFile != null) { + metadata.setObject(uploadedFile.getBytes()); + } + } + }); + form.add(fileUpload); + + form.add(new AjaxSubmitLink("doUpload", form) { + + private static final long serialVersionUID = -7978723352517770644L; + + @Override + protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) { + if (ArrayUtils.isNotEmpty(metadata.getObject())) { + try { + restClient.importIdPs(new ByteArrayInputStream(metadata.getObject())); + metadata.setObject(null); + + SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); + toggle(target, false); + target.add(container); + } catch (Exception e) { + LOG.error("While importing SAML 2.0 IdP metadata", e); + SyncopeConsoleSession.get().error( + StringUtils.isBlank(e.getMessage()) + ? e.getClass().getName() : e.getMessage()); + } + ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); + } + } + + @Override + protected void onError(final AjaxRequestTarget target, final Form<?> form) { + ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); + } + }); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java new file mode 100644 index 0000000..8a8d06e --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java @@ -0,0 +1,258 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.panels; + +import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.wizards.SAML2IdPWizardBuilder; +import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.commons.Constants; +import org.apache.syncope.client.console.commons.DirectoryDataProvider; +import org.apache.syncope.client.console.commons.SortableDataProviderComparator; +import org.apache.syncope.client.console.pages.BasePage; +import org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel.SAML2IdPsProvider; +import org.apache.syncope.client.console.rest.SAML2IdPsRestClient; +import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn; +import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn; +import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn; +import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; +import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink; +import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel; +import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel; +import org.apache.syncope.client.console.wizards.AjaxWizard; +import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.SyncopeClientException; +import org.apache.syncope.common.lib.to.SAML2IdPTO; +import org.apache.syncope.common.lib.types.SAML2SPEntitlement; +import org.apache.wicket.PageReference; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.event.Broadcast; +import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; +import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder; +import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; +import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.model.CompoundPropertyModel; +import org.apache.wicket.model.IModel; +import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; +import org.apache.wicket.util.crypt.Base64; + +public class SAML2IdPsDirectoryPanel extends DirectoryPanel< + SAML2IdPTO, SAML2IdPTO, SAML2IdPsProvider, SAML2IdPsRestClient> { + + private static final long serialVersionUID = 4792356089584116041L; + + private static final String PREF_SAML2_IDPS_PAGINATOR_ROWS = "saml2.idps.paginator.rows"; + + private final BaseModal<Serializable> metadataModal = new BaseModal<>("outer"); + + public SAML2IdPsDirectoryPanel(final String id, final PageReference pageRef) { + super(id, new Builder<SAML2IdPTO, SAML2IdPTO, SAML2IdPsRestClient>(new SAML2IdPsRestClient(), pageRef) { + + private static final long serialVersionUID = 8517982765290075155L; + + @Override + protected WizardMgtPanel<SAML2IdPTO> newInstance(final String id, final boolean wizardInModal) { + throw new UnsupportedOperationException(); + } + }.disableCheckBoxes()); + this.addNewItemPanelBuilder(new SAML2IdPWizardBuilder(this, new SAML2IdPTO(), pageRef), false); + + modal.addSubmitButton(); + modal.size(Modal.Size.Large); + modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { + + private static final long serialVersionUID = 8804221891699487139L; + + @Override + public void onClose(final AjaxRequestTarget target) { + updateResultTable(target); + modal.show(false); + } + }); + + addOuterObject(metadataModal); + setWindowClosedReloadCallback(metadataModal); + metadataModal.size(Modal.Size.Large); + + initResultTable(); + + final ImportMetadata importMetadata = new ImportMetadata("importMetadata", container, pageRef); + addInnerObject(importMetadata); + AjaxLink<Void> importMetadataLink = new AjaxLink<Void>("add") { + + private static final long serialVersionUID = -7978723352517770644L; + + @Override + public void onClick(final AjaxRequestTarget target) { + importMetadata.toggle(target, true); + } + }; + + ((WebMarkupContainer) get("container:content")).addOrReplace(importMetadataLink); + } + + @Override + protected SAML2IdPsProvider dataProvider() { + return new SAML2IdPsProvider(rows); + } + + @Override + protected String paginatorRowsKey() { + return PREF_SAML2_IDPS_PAGINATOR_ROWS; + } + + @Override + protected Collection<ActionLink.ActionType> getBulkActions() { + return Collections.<ActionLink.ActionType>emptyList(); + } + + @Override + protected List<IColumn<SAML2IdPTO, String>> getColumns() { + List<IColumn<SAML2IdPTO, String>> columns = new ArrayList<>(); + + columns.add(new KeyPropertyColumn<SAML2IdPTO>(new ResourceModel("key"), "key", "key")); + + columns.add(new PropertyColumn<SAML2IdPTO, String>(new ResourceModel("name"), "name", "name")); + columns.add(new PropertyColumn<SAML2IdPTO, String>(new ResourceModel("entityID"), "entityID", "entityID")); + columns.add(new BooleanPropertyColumn<SAML2IdPTO>( + new ResourceModel("useDeflateEncoding"), "useDeflateEncoding", "useDeflateEncoding")); + columns.add(new BooleanPropertyColumn<SAML2IdPTO>( + new ResourceModel("logoutSupported"), "logoutSupported", "logoutSupported")); + + columns.add(new ActionColumn<SAML2IdPTO, String>(new ResourceModel("actions", "")) { + + private static final long serialVersionUID = 906457126287899096L; + + @Override + public ActionLinksPanel<SAML2IdPTO> getActions( + final String componentId, final IModel<SAML2IdPTO> model) { + + ActionLinksPanel<SAML2IdPTO> panel = ActionLinksPanel.<SAML2IdPTO>builder(). + add(new ActionLink<SAML2IdPTO>() { + + private static final long serialVersionUID = -3722207913631435501L; + + @Override + public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) { + SAML2IdPTO object = restClient.read(model.getObject().getKey()); + send(SAML2IdPsDirectoryPanel.this, Broadcast.EXACT, + new AjaxWizard.EditItemActionEvent<>(object, target)); + } + }, ActionLink.ActionType.EDIT, SAML2SPEntitlement.IDP_UPDATE). + add(new ActionLink<SAML2IdPTO>() { + + private static final long serialVersionUID = -7978723352517770645L; + + @Override + public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) { + SAML2IdPTO object = restClient.read(model.getObject().getKey()); + metadataModal.header(Model.of(object.getName() + " - Metadata")); + metadataModal.setContent(new XMLEditorPanel( + metadataModal, + Model.of(new String(Base64.decodeBase64(object.getMetadata()))), + true, + pageRef)); + metadataModal.show(true); + target.add(metadataModal); + } + }, ActionLink.ActionType.HTML, SAML2SPEntitlement.IDP_READ). + add(new ActionLink<SAML2IdPTO>() { + + private static final long serialVersionUID = -5467832321897812767L; + + @Override + public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) { + try { + restClient.delete(model.getObject().getKey()); + SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); + target.add(container); + } catch (SyncopeClientException e) { + LOG.error("While deleting object {}", model.getObject().getKey(), e); + SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) + ? e.getClass().getName() : e.getMessage()); + } + ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); + } + }, ActionLink.ActionType.DELETE, SAML2SPEntitlement.IDP_DELETE). + build(componentId); + + return panel; + } + + @Override + public ActionLinksPanel<SAML2IdPTO> getHeader(final String componentId) { + final ActionLinksPanel.Builder<SAML2IdPTO> panel = ActionLinksPanel.builder(); + + return panel.add(new ActionLink<SAML2IdPTO>() { + + private static final long serialVersionUID = -5467832321897812767L; + + @Override + public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) { + if (target != null) { + target.add(container); + } + } + }, ActionLink.ActionType.RELOAD).build(componentId); + } + }); + + return columns; + } + + protected final class SAML2IdPsProvider extends DirectoryDataProvider<SAML2IdPTO> { + + private static final long serialVersionUID = -185944053385660794L; + + private final SortableDataProviderComparator<SAML2IdPTO> comparator; + + private SAML2IdPsProvider(final int paginatorRows) { + super(paginatorRows); + + setSort("name", SortOrder.ASCENDING); + comparator = new SortableDataProviderComparator<>(this); + } + + @Override + public Iterator<SAML2IdPTO> iterator(final long first, final long count) { + List<SAML2IdPTO> list = restClient.list(); + Collections.sort(list, comparator); + return list.subList((int) first, (int) first + (int) count).iterator(); + } + + @Override + public long size() { + return restClient.list().size(); + } + + @Override + public IModel<SAML2IdPTO> model(final SAML2IdPTO object) { + return new CompoundPropertyModel<>(object); + } + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2SPPanel.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2SPPanel.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2SPPanel.java new file mode 100644 index 0000000..c00400b --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2SPPanel.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.panels; + +import javax.ws.rs.client.ClientBuilder; +import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.commons.Constants; +import org.apache.syncope.client.console.commons.HttpResourceStream; +import org.apache.wicket.markup.html.link.Link; +import org.apache.wicket.markup.html.panel.Panel; +import org.apache.wicket.request.Url; +import org.apache.wicket.request.UrlUtils; +import org.apache.wicket.request.cycle.RequestCycle; +import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; +import org.apache.wicket.request.resource.ContentDisposition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SAML2SPPanel extends Panel { + + private static final long serialVersionUID = 2806917712636062674L; + + protected static final Logger LOG = LoggerFactory.getLogger(SAML2SPPanel.class); + + public SAML2SPPanel(final String id) { + super(id); + + add(new Link<Void>("downloadMetadata") { + + private static final long serialVersionUID = -4331619903296515985L; + + @Override + public void onClick() { + try { + HttpResourceStream stream = new HttpResourceStream(ClientBuilder.newClient(). + target(RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse( + UrlUtils.rewriteToContextRelative("saml2sp/metadata", RequestCycle.get())))). + request().get()); + + ResourceStreamRequestHandler rsrh = new ResourceStreamRequestHandler(stream); + rsrh.setFileName(stream.getFilename() == null + ? SyncopeConsoleSession.get().getDomain() + "-SAML-SP-Metadata.xml" + : stream.getFilename()); + rsrh.setContentDisposition(ContentDisposition.ATTACHMENT); + + getRequestCycle().scheduleRequestHandlerAfterCurrent(rsrh); + } catch (Exception e) { + LOG.error("While exporting SAML 2.0 SP metadata", e); + SyncopeConsoleSession.get().error(getString(Constants.ERROR) + ": " + e.getMessage()); + } + } + }); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/rest/SAML2IdPsRestClient.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/rest/SAML2IdPsRestClient.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/rest/SAML2IdPsRestClient.java new file mode 100644 index 0000000..ba67f57 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/rest/SAML2IdPsRestClient.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.rest; + +import java.io.InputStream; +import java.util.List; +import javax.ws.rs.core.MediaType; +import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.common.lib.to.SAML2IdPTO; +import org.apache.syncope.common.rest.api.service.SAML2IdPService; + +public class SAML2IdPsRestClient extends BaseRestClient { + + private static final long serialVersionUID = -5084300184764037527L; + + public List<SAML2IdPTO> list() { + return getService(SAML2IdPService.class).list(); + } + + public void importIdPs(final InputStream input) { + SyncopeConsoleSession.get(). + getService(MediaType.APPLICATION_XML_TYPE, SAML2IdPService.class).importFromMetadata(input); + } + + public SAML2IdPTO read(final String key) { + return getService(SAML2IdPService.class).read(key); + } + + public void update(final SAML2IdPTO idp) { + getService(SAML2IdPService.class).update(idp); + } + + public void delete(final String key) { + getService(SAML2IdPService.class).delete(key); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPMappingPanel.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPMappingPanel.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPMappingPanel.java new file mode 100644 index 0000000..2597f42 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPMappingPanel.java @@ -0,0 +1,87 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.wizards; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; +import org.apache.syncope.client.console.wizards.resources.JEXLTransformersTogglePanel; +import org.apache.syncope.client.console.wizards.resources.MappingItemTransformersTogglePanel; +import org.apache.syncope.common.lib.to.AnyTypeClassTO; +import org.apache.syncope.common.lib.to.MappingItemTO; +import org.apache.syncope.common.lib.to.SAML2IdPTO; +import org.apache.syncope.common.lib.types.AnyTypeKind; +import org.apache.syncope.common.lib.types.MappingPurpose; +import org.apache.wicket.model.IModel; +import org.apache.wicket.model.Model; +import org.apache.wicket.model.util.ListModel; + +public class SAML2IdPMappingPanel extends AbstractMappingPanel { + + private static final long serialVersionUID = 2248901624411541853L; + + public SAML2IdPMappingPanel( + final String id, + final SAML2IdPTO idpTO, + final MappingItemTransformersTogglePanel mapItemTransformers, + final JEXLTransformersTogglePanel jexlTransformers) { + + super(id, + mapItemTransformers, + jexlTransformers, + new ListModel<MappingItemTO>(idpTO.getMappingItems()), + true, + true, + MappingPurpose.NONE); + + setOutputMarkupId(true); + } + + @Override + protected void onBeforeRender() { + super.onBeforeRender(); + purposeLabel.setVisible(false); + } + + @Override + protected IModel<List<String>> getExtAttrNames() { + return Model.ofList(Collections.<String>singletonList("NameID")); + } + + @Override + protected void setAttrNames(final AjaxTextFieldPanel toBeUpdated) { + toBeUpdated.setRequired(true); + toBeUpdated.setEnabled(true); + + List<String> choices = new ArrayList<>(USER_FIELD_NAMES); + + for (AnyTypeClassTO anyTypeClassTO : anyTypeClassRestClient.list( + anyTypeRestClient.read(AnyTypeKind.USER.name()).getClasses())) { + + choices.addAll(anyTypeClassTO.getPlainSchemas()); + choices.addAll(anyTypeClassTO.getDerSchemas()); + choices.addAll(anyTypeClassTO.getVirSchemas()); + } + + Collections.sort(choices); + toBeUpdated.setChoices(choices); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPWizardBuilder.java ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPWizardBuilder.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPWizardBuilder.java new file mode 100644 index 0000000..333c00e --- /dev/null +++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/wizards/SAML2IdPWizardBuilder.java @@ -0,0 +1,143 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.wizards; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.collections4.IterableUtils; +import org.apache.commons.collections4.Predicate; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel; +import org.apache.syncope.client.console.rest.SAML2IdPsRestClient; +import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel; +import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; +import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel; +import org.apache.syncope.client.console.wizards.resources.JEXLTransformersTogglePanel; +import org.apache.syncope.client.console.wizards.resources.MappingItemTransformersTogglePanel; +import org.apache.syncope.common.lib.to.MappingItemTO; +import org.apache.syncope.common.lib.to.SAML2IdPTO; +import org.apache.wicket.Component; +import org.apache.wicket.PageReference; +import org.apache.wicket.extensions.wizard.WizardModel; +import org.apache.wicket.extensions.wizard.WizardStep; +import org.apache.wicket.markup.html.list.ListItem; +import org.apache.wicket.markup.html.list.ListView; +import org.apache.wicket.model.Model; +import org.apache.wicket.model.PropertyModel; +import org.apache.wicket.model.StringResourceModel; + +public class SAML2IdPWizardBuilder extends AjaxWizardBuilder<SAML2IdPTO> { + + private static final long serialVersionUID = 5952696913893950460L; + + private final SAML2IdPsRestClient restClient = new SAML2IdPsRestClient(); + + private final SAML2IdPsDirectoryPanel directoryPanel; + + public SAML2IdPWizardBuilder( + final SAML2IdPsDirectoryPanel directoryPanel, final SAML2IdPTO idpTO, final PageReference pageRef) { + + super(idpTO, pageRef); + this.directoryPanel = directoryPanel; + } + + @Override + protected WizardModel buildModelSteps(final SAML2IdPTO modelObject, final WizardModel wizardModel) { + wizardModel.add(new IdP(modelObject)); + + Mapping mapping = new Mapping(modelObject); + mapping.setOutputMarkupId(true); + + MappingItemTransformersTogglePanel mapItemTransformers = + new MappingItemTransformersTogglePanel(mapping, pageRef); + addOuterObject(mapItemTransformers); + JEXLTransformersTogglePanel jexlTransformers = new JEXLTransformersTogglePanel(mapping, pageRef); + addOuterObject(jexlTransformers); + mapping.add(new SAML2IdPMappingPanel("mapping", modelObject, mapItemTransformers, jexlTransformers)); + + wizardModel.add(mapping); + + return wizardModel; + } + + private static final class IdP extends WizardStep { + + private static final long serialVersionUID = 854012593185195024L; + + IdP(final SAML2IdPTO idpTO) { + super(StringUtils.EMPTY, StringUtils.EMPTY); + + List<Component> fields = new ArrayList<>(); + + FieldPanel<String> name = new AjaxTextFieldPanel( + "field", "name", new PropertyModel<String>(idpTO, "name"), false); + name.setRequired(true); + fields.add(name); + + AjaxCheckBoxPanel useDeflateEncoding = new AjaxCheckBoxPanel( + "field", "useDeflateEncoding", new PropertyModel<Boolean>(idpTO, "useDeflateEncoding"), false); + fields.add(useDeflateEncoding); + + add(new ListView<Component>("fields", fields) { + + private static final long serialVersionUID = -9180479401817023838L; + + @Override + protected void populateItem(final ListItem<Component> item) { + item.add(item.getModelObject()); + } + + }); + } + } + + /** + * Mapping definition step. + */ + private static final class Mapping extends WizardStep { + + private static final long serialVersionUID = 3454904947720856253L; + + Mapping(final SAML2IdPTO item) { + setTitleModel(Model.of("Mapping")); + setSummaryModel(Model.of(StringUtils.EMPTY)); + } + } + + @Override + protected Serializable onApplyInternal(final SAML2IdPTO modelObject) { + long connObjectKeyCount = IterableUtils.countMatches( + modelObject.getMappingItems(), new Predicate<MappingItemTO>() { + + @Override + public boolean evaluate(final MappingItemTO item) { + return item.isConnObjectKey(); + } + }); + if (connObjectKeyCount != 1) { + throw new IllegalArgumentException( + new StringResourceModel("connObjectKeyValidation", directoryPanel).getString()); + } + + restClient.update(modelObject); + return modelObject; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.html ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.html b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.html new file mode 100644 index 0000000..63e124b --- /dev/null +++ b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> + <wicket:extend> + <section class="content-header"> + <h1> </h1> + <ol class="breadcrumb"> + <li><a wicket:id="dashboardBr"><i class="fa fa-dashboard"></i> <wicket:message key="dashboard"/></a></li> + <li class="active"><wicket:message key="extensions"/></li> + <li class="active">SAML 2.0 SP</li> + </ol> + </section> + + <section class="content" wicket:id="content"> + <div class="box"> + <div class="box-body" wicket:id="tabbedPanel"/> + </div> + </section> + </wicket:extend> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.properties ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.properties b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.properties new file mode 100644 index 0000000..ead24e7 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +idps=Identity Providers +sp=Service Provider http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_it.properties ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_it.properties b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_it.properties new file mode 100644 index 0000000..ead24e7 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_it.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +idps=Identity Providers +sp=Service Provider http://git-wip-us.apache.org/repos/asf/syncope/blob/3d7405db/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_pt_BR.properties ---------------------------------------------------------------------- diff --git a/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_pt_BR.properties b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_pt_BR.properties new file mode 100644 index 0000000..ead24e7 --- /dev/null +++ b/ext/saml2sp/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP_pt_BR.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +idps=Identity Providers +sp=Service Provider
