vincent 3 years ago
parent
commit
94e7b11841
100 changed files with 12911 additions and 0 deletions
  1. BIN
      .DS_Store
  2. 7 0
      .checkstyle
  3. 228 0
      CONTRIBUTING.md
  4. 1061 0
      LICENSE
  5. 19 0
      NOTICE
  6. 634 0
      ReleaseNotes.txt
  7. 443 0
      build.gradle
  8. 128 0
      build_cnf.gradle
  9. 324 0
      checkstyle/checkstyle-rules.xml
  10. 443 0
      config/build_docker.gradle
  11. 444 0
      config/build_jar.gradle
  12. 544 0
      config/build_standard.gradle
  13. BIN
      demo-server/.DS_Store
  14. 19 0
      demo-server/build.gradle
  15. BIN
      demo-server/src/.DS_Store
  16. BIN
      demo-server/src/main/.DS_Store
  17. 16 0
      demo-server/src/main/java/com/dm/Controller/DemoController.java
  18. 24 0
      demo-server/src/main/java/com/dm/DemoApplication.java
  19. 10 0
      demo-server/src/main/resources/application.yml
  20. 12 0
      demo-server/src/main/resources/bootstrap.properties
  21. 34 0
      demo-server/src/main/resources/log4j2.xml
  22. BIN
      docker/.DS_Store
  23. 43 0
      docker/docker-compose.yml
  24. 8 0
      docker/docker-maxkey-mgt/Dockerfile
  25. 8 0
      docker/docker-maxkey/Dockerfile
  26. BIN
      docker/docker-mysql/.DS_Store
  27. 20 0
      docker/docker-mysql/Dockerfile
  28. 201 0
      docker/docker-mysql/LICENSE
  29. 4 0
      docker/docker-mysql/README.md
  30. 39 0
      docker/docker-mysql/mysqld.cnf
  31. BIN
      docker/docker-mysql/sql/.DS_Store
  32. 0 0
      docker/docker-mysql/sql/.keep
  33. 7 0
      docker/docker-mysql/sql/init.sql
  34. 3 0
      docker/docker-mysql/sql/v2.9.0.ga/init_v2.9.0.ga.sql
  35. 843 0
      docker/docker-mysql/sql/v2.9.0.ga/maxkey_v2.9.0.GA.sql
  36. 33 0
      docker/docker-mysql/sql/v2.9.0.ga/maxkey_v2.9.0.GA_data.sql
  37. 3 0
      docker/docker-mysql/sql/v3.0.0.ga/init_v3.0.0.ga.sql
  38. 843 0
      docker/docker-mysql/sql/v3.0.0.ga/maxkey_v3.0.0.GA.sql
  39. 33 0
      docker/docker-mysql/sql/v3.0.0.ga/maxkey_v3.0.0.GA_data.sql
  40. 7 0
      docker/docker-mysql/sql/v3.1.0.ga/init.sql
  41. 924 0
      docker/docker-mysql/sql/v3.1.0.ga/maxkey_v3.1.0.GA.sql
  42. 23 0
      docker/docker-mysql/sql/v3.1.0.ga/maxkey_v3.1.0.GA_data.sql
  43. 926 0
      docker/docker-mysql/sql/v3.1.1.ga/maxkey_v3.1.1.GA.sql
  44. 23 0
      docker/docker-mysql/sql/v3.1.1.ga/maxkey_v3.1.1.GA_data.sql
  45. 25 0
      eclipsePluginApply.bat
  46. 162 0
      gradle.properties
  47. BIN
      gradle/wrapper/gradle-wrapper.jar
  48. 5 0
      gradle/wrapper/gradle-wrapper.properties
  49. 234 0
      gradlew
  50. 89 0
      gradlew.bat
  51. BIN
      images/logo.jpg
  52. BIN
      images/logo_maxkey.png
  53. BIN
      images/maxkey_index.png
  54. BIN
      images/maxkey_login.png
  55. BIN
      images/maxkey_mgt_apps.png
  56. BIN
      images/maxkey_mgt_rpt.png
  57. BIN
      images/maxkey_mgt_users.png
  58. BIN
      maxkey-authentications/.DS_Store
  59. BIN
      maxkey-authentications/maxkey-authentication-captcha/.DS_Store
  60. 8 0
      maxkey-authentications/maxkey-authentication-captcha/build.gradle
  61. BIN
      maxkey-authentications/maxkey-authentication-captcha/src/.DS_Store
  62. 94 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/java/com/google/code/kaptcha/impl/LightNoise.java
  63. 49 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/java/com/google/code/kaptcha/impl/Ripple.java
  64. 128 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/java/com/google/code/kaptcha/text/impl/RandomColorWordRenderer.java
  65. 60 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/java/org/maxkey/autoconfigure/KaptchaAutoConfiguration.java
  66. 141 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/java/org/maxkey/web/contorller/ImageCaptchaEndpoint.java
  67. 9 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/resources/kaptcha.properties
  68. 13 0
      maxkey-authentications/maxkey-authentication-captcha/src/main/resources/kaptcha_c.properties
  69. BIN
      maxkey-authentications/maxkey-authentication-core/.DS_Store
  70. 14 0
      maxkey-authentications/maxkey-authentication-core/build.gradle
  71. BIN
      maxkey-authentications/maxkey-authentication-core/src/.DS_Store
  72. 3 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/META-INF/MANIFEST.MF
  73. 364 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/AbstractAuthenticationProvider.java
  74. 229 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/LoginCredential.java
  75. 227 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/RealmAuthenticationProvider.java
  76. 126 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/SavedRequestAwareAuthenticationSuccessHandler.java
  77. 194 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/SigninPrincipal.java
  78. 94 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/InMemoryOnlineTicketServices.java
  79. 118 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/OnlineTicket.java
  80. 35 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/OnlineTicketServices.java
  81. 48 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/OnlineTicketServicesFactory.java
  82. 109 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/RedisOnlineTicketServices.java
  83. 262 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/AbstractAuthenticationRealm.java
  84. 29 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/IAuthenticationServer.java
  85. 74 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/activedirectory/ActiveDirectoryAuthenticationRealm.java
  86. 78 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/activedirectory/ActiveDirectoryServer.java
  87. 138 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/jdbc/JdbcAuthenticationRealm.java
  88. 72 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/ldap/LdapAuthenticationRealm.java
  89. 98 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/ldap/LdapServer.java
  90. 149 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/basic/BasicEntryPoint.java
  91. 98 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/certs/HttpCertsEntryPoint.java
  92. 146 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/httpheader/HttpHeaderEntryPoint.java
  93. 127 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/jwt/HttpJwtEntryPoint.java
  94. 134 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/jwt/JwtLoginService.java
  95. 143 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/HttpKerberosEntryPoint.java
  96. 80 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/KerberosProxy.java
  97. 28 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/KerberosService.java
  98. 77 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/KerberosToken.java
  99. 53 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/RemoteKerberosService.java
  100. 166 0
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/rememberme/AbstractRemeberMeService.java

BIN
.DS_Store


+ 7 - 0
.checkstyle

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+  <fileset name="all" enabled="true" check-config-name="checkstyle-rules" local="false">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+</fileset-config>

+ 228 - 0
CONTRIBUTING.md

@@ -0,0 +1,228 @@
+# 贡献代码
+
+欢迎您对MaxKey项目的贡献。
+我们诚挚的感谢你的贡献,这个文档描述了我们的工作方式和工作流程,开发者也可以同时参考官方的相关文档。
+
+## Workflow
+
+MaxKey开发中使用到的几种模型在这个链接下载 [点我](https://github.com/MaxKeyTop/MaxKey/archive/master.zip).  
+之后是贡献代码的主要流程。
+
+### Fork
+
+* MaxKey采用Pull Request的方式提交代码,禁止直接push,所有的代码都需要人工review。首先要fork一份MaxKey的代码 ["Fork" button](https://help.github.com/articles/fork-a-repo/).
+* 跳转到[MaxKey](https://github.com/MaxKeyTop/MaxKey) GitHub首页,然后单击 `Fork` 按钮,生成自己目录下的仓库,比如 <https://github.com/你的用户名/MaxKey>。
+
+### Clone(克隆)
+将远程仓库 clone 到本地:
+
+```bash
+➜  git clone https://github.com/你的用户名/MaxKey
+➜  cd MaxKey
+```
+
+### 创建本地分支
+
+MaxKey 目前使用[Git流分支模型](http://nvie.com/posts/a-successful-git-branching-model/)进行开发,测试,发行和维护
+
+所有的 feature 和 bug fix 的开发工作都应该在一个新的分支上完成,一般从 `develop` 分支上创建新分支。
+
+使用 `git checkout -b` 创建并切换到新分支。
+
+```bash
+➜  git checkout -b my-cool-stuff
+```
+
+值得注意的是,在 checkout 之前,需要保持当前分支目录 clean,否则会把 untracked 的文件也带到新分支上,这可以通过 `git status` 查看。
+
+### 使用 `pre-commit` 钩子
+
+MaxKey 开发人员使用 [pre-commit](http://pre-commit.com/) 工具来管理 Git 预提交钩子。 在提交(commit)前自动检查一些基本事宜(如每个文件只有一个 EOL,Git 中不要添加大文件等)。
+
+`pre-commit`测试是单元测试的一部分,不满足钩子的 PR 不能被提交到 MaxKey,首先安装并在当前目录运行它:
+
+```bash
+pip install pre-commit
+pre-commit -v -a
+```
+
+
+## 开始开发
+
+在本例中,我删除了 README.md 中的一行,并创建了一个新文件。
+
+通过 `git status` 查看当前状态,这会提示当前目录的一些变化,同时也可以通过 `git diff` 查看文件具体被修改的内容。
+
+```bash
+➜  git status
+On branch test
+Changes not staged for commit:
+  (use "git add <file>..." to update what will be committed)
+  (use "git checkout -- <file>..." to discard changes in working directory)
+
+	modified:   README.md
+
+Untracked files:
+  (use "git add <file>..." to include in what will be committed)
+
+	test
+
+no changes added to commit (use "git add" and/or "git commit -a")
+```
+
+## 构建
+
+配置环境变量
+gradleSetEnv.bat
+
+set JAVA_HOME=D:\JavaIDE\jdk1.8.0_91
+
+set GRADLE_HOME=D:\JavaIDE\gradle-5.4.1
+
+启动构建
+gradleBuildRelease.bat
+
+构建结果
+构建包路径
+
+MaxKey/build/maxkey-jars
+
+依赖包路径
+
+MaxKey/build/maxkey-depjars
+
+具体开发配置参见 https://maxkey.top/zh/development.html
+
+
+## 提交(commit)
+
+接下来我们取消对 README.md 文件的改变,然后提交新添加的 test 文件。
+
+```bash
+➜  git checkout -- README.md
+➜  git status
+On branch test
+Untracked files:
+  (use "git add <file>..." to include in what will be committed)
+
+	test
+
+nothing added to commit but untracked files present (use "git add" to track)
+➜  git add test
+```
+
+Git 每次提交代码,都需要写提交说明,这可以让其他人知道这次提交做了哪些改变,这可以通过`git commit` 完成。
+
+```bash
+▶ pre-commit run -a -v
+[remove-crlf] CRLF end-lines remover........................................Passed
+[remove-tabs] Tabs remover..................................................Passed
+[check-added-large-files] Check for added large files.......................Passed
+[check-merge-conflict] Check for merge conflicts............................Passed
+[check-symlinks] Check for broken symlinks..................................Passed
+[detect-private-key] Detect Private Key.....................................Passed
+[end-of-file-fixer] Fix End of Files........................................Passed
+[trailing-whitespace] Trim Trailing Whitespace..............................Passed
+[copyright] copyright.......................................................Passed
+[clang-format] clang-format.................................................Passed
+```
+
+## 保持本地仓库最新
+
+在准备发起 Pull Request 之前,需要同步原仓库(<https://github.com/MaxKeyTop/MaxKey>)最新的代码。
+
+首先通过 `git remote` 查看当前远程仓库的名字。
+
+```bash
+➜  git remote
+origin
+➜  git remote -v
+origin	https://github.com/USERNAME/MaxKey (fetch)
+origin	https://github.com/USERNAME/MaxKey (push)
+```
+
+这里 origin 是我们 clone 的远程仓库的名字,也就是自己用户名下的 MaxKey,接下来我们创建一个原始 MaxKey 仓库的远程主机,命名为 upstream。
+
+```bash
+➜  git remote add upstream https://github.com/MaxKeyTop/MaxKey
+➜  git remote
+origin
+upstream
+```
+
+获取 upstream 的最新代码并更新当前分支。
+
+```bash
+➜  git fetch upstream
+➜  git pull upstream develop
+```
+
+## Push 到远程仓库
+
+将本地的修改推送到 GitHub 上,也就是 https://github.com/USERNAME/MaxKey。
+
+```bash
+# 推送到远程仓库 origin 的 my-cool-stuff 分支上
+➜  git push origin my-cool-stuff
+```
+
+## 建立 Issue 并完成 Pull Request
+
+建立一个 Issue 描述问题,并记录它的编号。
+
+切换到所建分支,然后点击 `New pull request`。
+
+在 PR 的描述说明中,填写 `resolve #Issue编号` 可以在这个 PR 被 merge 后,自动关闭对应的 Issue
+> 具体请见 <https://help.github.com/articles/closing-issues-via-commit-messages/>
+
+
+## review
+
+
+
+## 删除远程分支
+
+在 PR 被 merge 进主仓库后,我们可以在 PR 的页面删除远程仓库的分支。
+
+也可以使用 `git push origin :分支名` 删除远程分支,如:
+
+```bash
+➜  git push origin :my-cool-stuff
+```
+
+## 删除本地分支
+
+最后,删除本地分支。
+
+```bash
+# 切换到 develop 分支
+➜  git checkout develop 
+
+# 删除 my-cool-stuff 分支
+➜  git branch -D my-cool-stuff
+```
+
+至此,我们就完成了一次代码贡献的过程。
+
+## 提交代码的一些约定
+
+为了使评审人在评审代码时更好地专注于代码本身,请您每次提交代码时,遵守以下约定:
+
+1. 请保证单元测试能顺利通过。如果没过,说明提交的代码存在问题,评审人一般不做评审。
+2. 提交Pull Request前:
+   - 请注意commit的数量:
+     - 原因:如果仅仅修改一个文件但提交了十几个commit,每个commit只做了少量的修改,这会给评审人带来很大困扰。评审人需要逐一查看每个commit才能知道做了哪些修改,且不排除commit之间的修改存在相互覆盖的情况。
+     - 建议:每次提交时,保持尽量少的commit,可以通过`git commit --amend`补充上次的commit。对已经Push到远程仓库的多个commit,可以参考[squash commits after push](http://stackoverflow.com/questions/5667884/how-to-squash-commits-in-git-after-they-have-been-pushed)。
+   - 请注意每个commit的名称:应能反映当前commit的内容,不能太随意。
+3. 如果解决了某个Issue的问题,请在该Pull Request的**第一个**评论框中加上:`fix #issue_number`,这样当该Pull Request被合并后,会自动关闭对应的Issue。关键词包括:close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved,请选择合适的词汇。详细可参考[Closing issues via commit messages](https://help.github.com/articles/closing-issues-via-commit-messages)。
+
+此外,在回复评审人意见时,请您遵守以下约定:
+
+1. 评审人的每个意见都必须回复(这是开源社区的基本礼貌,别人帮了忙,应该说谢谢):
+   - 对评审意见同意且按其修改完的,给个简单的`Done`即可;
+   - 对评审意见不同意的,请给出您自己的反驳理由。
+2. 如果评审意见比较多:
+   - 请给出总体的修改情况。
+   - 请采用[start a review](https://help.github.com/articles/reviewing-proposed-changes-in-a-pull-request/)进行回复,而非直接回复的方式。原因是每个回复都会发送一封邮件,会造成邮件灾难。
+
+

+ 1061 - 0
LICENSE

@@ -0,0 +1,1061 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+
+
+APACHE TOMCAT SUBCOMPONENTS:
+
+Apache Tomcat includes a number of subcomponents with separate copyright notices
+and license terms. Your use of these subcomponents is subject to the terms and
+conditions of the following licenses.
+
+
+For the Eclipse JDT Core Batch Compiler (ecj-x.x.x.jar) component:
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement , including but not limited to the risks and costs
+of program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+(excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
+may assign the responsibility to serve as the Agreement Steward to a suitable
+separate entity. Each new version of the Agreement will be given a
+distinguishing version number. The Program (including Contributions) may always
+be distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its Contributions)
+under the new version. Except as expressly stated in Sections 2(a) and 2(b)
+above, Recipient receives no rights or licenses to the intellectual property of
+any Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+
+For the Windows Installer component:
+
+    * All NSIS source code, plug-ins, documentation, examples, header files and
+       graphics, with the exception of the compression modules and where
+       otherwise noted, are licensed under the zlib/libpng license.
+    * The zlib compression module for NSIS is licensed under the zlib/libpng
+       license.
+    * The bzip2 compression module for NSIS is licensed under the bzip2 license.
+    * The lzma compression module for NSIS is licensed under the Common Public
+       License version 1.0.
+
+zlib/libpng license
+
+This software is provided 'as-is', without any express or implied warranty. In
+no event will the authors be held liable for any damages arising from the use of
+this software.
+
+Permission is granted to anyone to use this software for any purpose, including
+commercial applications, and to alter it and redistribute it freely, subject to
+the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not claim
+       that you wrote the original software. If you use this software in a
+       product, an acknowledgment in the product documentation would be
+       appreciated but is not required.
+   2. Altered source versions must be plainly marked as such, and must not be
+       misrepresented as being the original software.
+   3. This notice may not be removed or altered from any source distribution.
+
+bzip2 license
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+   2. The origin of this software must not be misrepresented; you must not claim
+       that you wrote the original software. If you use this software in a
+       product, an acknowledgment in the product documentation would be
+       appreciated but is not required.
+   3. Altered source versions must be plainly marked as such, and must not be
+       misrepresented as being the original software.
+   4. The name of the author may not be used to endorse or promote products
+       derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+
+Julian Seward, Cambridge, UK.
+
+jseward@acm.org
+Common Public License version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and b) in the case of each subsequent
+Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+Special exception for LZMA compression module
+
+Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for
+NSIS, expressly permit you to statically or dynamically link your code (or bind
+by name) to the files from the LZMA compression module for NSIS without
+subjecting your linked code to the terms of the Common Public license version
+1.0. Any modifications or additions to files from the LZMA compression module
+for NSIS, however, are subject to the terms of the Common Public License version
+1.0.
+
+
+For the following XML Schemas for Java EE Deployment Descriptors:
+ - javaee_5.xsd
+ - javaee_web_services_1_2.xsd
+ - javaee_web_services_client_1_2.xsd
+ - javaee_6.xsd
+ - javaee_web_services_1_3.xsd
+ - javaee_web_services_client_1_3.xsd
+ - jsp_2_2.xsd
+ - web-app_3_0.xsd
+ - web-common_3_0.xsd
+ - web-fragment_3_0.xsd
+ - javaee_7.xsd
+ - javaee_web_services_1_4.xsd
+ - javaee_web_services_client_1_4.xsd
+ - jsp_2_3.xsd
+ - web-app_3_1.xsd
+ - web-common_3_1.xsd
+ - web-fragment_3_1.xsd
+ - javaee_8.xsd
+ - web-app_4_0.xsd
+ - web-common_4_0.xsd
+ - web-fragment_4_0.xsd
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+   1.1. Contributor. means each individual or entity that creates or contributes
+        to the creation of Modifications.
+
+   1.2. Contributor Version. means the combination of the Original Software,
+        prior Modifications used by a Contributor (if any), and the
+        Modifications made by that particular Contributor.
+
+   1.3. Covered Software. means (a) the Original Software, or (b) Modifications,
+        or (c) the combination of files containing Original Software with files
+        containing Modifications, in each case including portions thereof.
+
+   1.4. Executable. means the Covered Software in any form other than Source
+        Code.
+
+   1.5. Initial Developer. means the individual or entity that first makes
+        Original Software available under this License.
+
+   1.6. Larger Work. means a work which combines Covered Software or portions
+        thereof with code not governed by the terms of this License.
+
+   1.7. License. means this document.
+
+   1.8. Licensable. means having the right to grant, to the maximum extent
+        possible, whether at the time of the initial grant or subsequently
+        acquired, any and all of the rights conveyed herein.
+
+   1.9. Modifications. means the Source Code and Executable form of any of the
+        following:
+
+        A. Any file that results from an addition to, deletion from or
+           modification of the contents of a file containing Original Software
+           or previous Modifications;
+
+        B. Any new file that contains any part of the Original Software or
+           previous Modification; or
+
+        C. Any new file that is contributed or otherwise made available under
+           the terms of this License.
+
+   1.10. Original Software. means the Source Code and Executable form of
+         computer software code that is originally released under this License.
+
+   1.11. Patent Claims. means any patent claim(s), now owned or hereafter
+         acquired, including without limitation, method, process, and apparatus
+         claims, in any patent Licensable by grantor.
+
+   1.12. Source Code. means (a) the common form of computer software code in
+         which modifications are made and (b) associated documentation included
+         in or with such code.
+
+   1.13. You. (or .Your.) means an individual or a legal entity exercising
+         rights under, and complying with all of the terms of, this License. For
+         legal entities, .You. includes any entity which controls, is controlled
+         by, or is under common control with You. For purposes of this
+         definition, .control. means (a) the power, direct or indirect, to cause
+         the direction or management of such entity, whether by contract or
+         otherwise, or (b) ownership of more than fifty percent (50%) of the
+         outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+      2.1. The Initial Developer Grant.
+
+      Conditioned upon Your compliance with Section 3.1 below and subject to
+      third party intellectual property claims, the Initial Developer hereby
+      grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark)
+            Licensable by Initial Developer, to use, reproduce, modify, display,
+            perform, sublicense and distribute the Original Software (or
+            portions thereof), with or without Modifications, and/or as part of
+            a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using or selling of
+            Original Software, to make, have made, use, practice, sell, and
+            offer for sale, and/or otherwise dispose of the Original Software
+            (or portions thereof).
+
+        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
+            date Initial Developer first distributes or otherwise makes the
+            Original Software available to a third party under the terms of this
+            License.
+
+        (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
+            (1) for code that You delete from the Original Software, or (2) for
+            infringements caused by: (i) the modification of the Original
+            Software, or (ii) the combination of the Original Software with
+            other software or devices.
+
+    2.2. Contributor Grant.
+
+    Conditioned upon Your compliance with Section 3.1 below and subject to third
+    party intellectual property claims, each Contributor hereby grants You a
+    world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark)
+            Licensable by Contributor to use, reproduce, modify, display,
+            perform, sublicense and distribute the Modifications created by such
+            Contributor (or portions thereof), either on an unmodified basis,
+            with other Modifications, as Covered Software and/or as part of a
+            Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using, or selling of
+            Modifications made by that Contributor either alone and/or in
+            combination with its Contributor Version (or portions of such
+            combination), to make, use, sell, offer for sale, have made, and/or
+            otherwise dispose of: (1) Modifications made by that Contributor (or
+            portions thereof); and (2) the combination of Modifications made by
+            that Contributor with its Contributor Version (or portions of such
+            combination).
+
+        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
+            the date Contributor first distributes or otherwise makes the
+            Modifications available to a third party.
+
+        (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
+            (1) for any code that Contributor has deleted from the Contributor
+            Version; (2) for infringements caused by: (i) third party
+            modifications of Contributor Version, or (ii) the combination of
+            Modifications made by that Contributor with other software (except
+            as part of the Contributor Version) or other devices; or (3) under
+            Patent Claims infringed by Covered Software in the absence of
+            Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+      3.1. Availability of Source Code.
+      Any Covered Software that You distribute or otherwise make available in
+      Executable form must also be made available in Source Code form and that
+      Source Code form must be distributed only under the terms of this License.
+      You must include a copy of this License with every copy of the Source Code
+      form of the Covered Software You distribute or otherwise make available.
+      You must inform recipients of any such Covered Software in Executable form
+      as to how they can obtain such Covered Software in Source Code form in a
+      reasonable manner on or through a medium customarily used for software
+      exchange.
+
+      3.2. Modifications.
+      The Modifications that You create or to which You contribute are governed
+      by the terms of this License. You represent that You believe Your
+      Modifications are Your original creation(s) and/or You have sufficient
+      rights to grant the rights conveyed by this License.
+
+      3.3. Required Notices.
+      You must include a notice in each of Your Modifications that identifies
+      You as the Contributor of the Modification. You may not remove or alter
+      any copyright, patent or trademark notices contained within the Covered
+      Software, or any notices of licensing or any descriptive text giving
+      attribution to any Contributor or the Initial Developer.
+
+      3.4. Application of Additional Terms.
+      You may not offer or impose any terms on any Covered Software in Source
+      Code form that alters or restricts the applicable version of this License
+      or the recipients. rights hereunder. You may choose to offer, and to
+      charge a fee for, warranty, support, indemnity or liability obligations to
+      one or more recipients of Covered Software. However, you may do so only on
+      Your own behalf, and not on behalf of the Initial Developer or any
+      Contributor. You must make it absolutely clear that any such warranty,
+      support, indemnity or liability obligation is offered by You alone, and
+      You hereby agree to indemnify the Initial Developer and every Contributor
+      for any liability incurred by the Initial Developer or such Contributor as
+      a result of warranty, support, indemnity or liability terms You offer.
+
+      3.5. Distribution of Executable Versions.
+      You may distribute the Executable form of the Covered Software under the
+      terms of this License or under the terms of a license of Your choice,
+      which may contain terms different from this License, provided that You are
+      in compliance with the terms of this License and that the license for the
+      Executable form does not attempt to limit or alter the recipient.s rights
+      in the Source Code form from the rights set forth in this License. If You
+      distribute the Covered Software in Executable form under a different
+      license, You must make it absolutely clear that any terms which differ
+      from this License are offered by You alone, not by the Initial Developer
+      or Contributor. You hereby agree to indemnify the Initial Developer and
+      every Contributor for any liability incurred by the Initial Developer or
+      such Contributor as a result of any such terms You offer.
+
+      3.6. Larger Works.
+      You may create a Larger Work by combining Covered Software with other code
+      not governed by the terms of this License and distribute the Larger Work
+      as a single product. In such a case, You must make sure the requirements
+      of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+      4.1. New Versions.
+      Sun Microsystems, Inc. is the initial license steward and may publish
+      revised and/or new versions of this License from time to time. Each
+      version will be given a distinguishing version number. Except as provided
+      in Section 4.3, no one other than the license steward has the right to
+      modify this License.
+
+      4.2. Effect of New Versions.
+      You may always continue to use, distribute or otherwise make the Covered
+      Software available under the terms of the version of the License under
+      which You originally received the Covered Software. If the Initial
+      Developer includes a notice in the Original Software prohibiting it from
+      being distributed or otherwise made available under any subsequent version
+      of the License, You must distribute and make the Covered Software
+      available under the terms of the version of the License under which You
+      originally received the Covered Software. Otherwise, You may also choose
+      to use, distribute or otherwise make the Covered Software available under
+      the terms of any subsequent version of the License published by the
+      license steward.
+
+      4.3. Modified Versions.
+      When You are an Initial Developer and You want to create a new license for
+      Your Original Software, You may create and use a modified version of this
+      License if You: (a) rename the license and remove any references to the
+      name of the license steward (except to note that the license differs from
+      this License); and (b) otherwise make it clear that the license contains
+      terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+   COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT
+   WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+   LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
+   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
+   AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD
+   ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL
+   DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
+   SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+   ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED
+   HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+      6.1. This License and the rights granted hereunder will terminate
+           automatically if You fail to comply with terms herein and fail to
+           cure such breach within 30 days of becoming aware of the breach.
+           Provisions which, by their nature, must remain in effect beyond the
+           termination of this License shall survive.
+
+      6.2. If You assert a patent infringement claim (excluding declaratory
+           judgment actions) against Initial Developer or a Contributor (the
+           Initial Developer or Contributor against whom You assert such claim
+           is referred to as .Participant.) alleging that the Participant
+           Software (meaning the Contributor Version where the Participant is a
+           Contributor or the Original Software where the Participant is the
+           Initial Developer) directly or indirectly infringes any patent, then
+           any and all rights granted directly or indirectly to You by such
+           Participant, the Initial Developer (if the Initial Developer is not
+           the Participant) and all Contributors under Sections 2.1 and/or 2.2
+           of this License shall, upon 60 days notice from Participant terminate
+           prospectively and automatically at the expiration of such 60 day
+           notice period, unless if within such 60 day period You withdraw Your
+           claim with respect to the Participant Software against such
+           Participant either unilaterally or pursuant to a written agreement
+           with Participant.
+
+      6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+           user licenses that have been validly granted by You or any
+           distributor hereunder prior to termination (excluding licenses
+           granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+   UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+   NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+   OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF
+   ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+   INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+   LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+   COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
+   LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
+   SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR
+   DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT
+   APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+   EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS
+   EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+   The Covered Software is a .commercial item,. as that term is defined in 48
+   C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as
+   that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and commercial
+   computer software documentation. as such terms are used in 48 C.F.R. 12.212
+   (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
+   through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered
+   Software with only those rights set forth herein. This U.S. Government Rights
+   clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or
+   provision that addresses Government rights in computer software under this
+   License.
+
+9. MISCELLANEOUS.
+
+   This License represents the complete agreement concerning subject matter
+   hereof. If any provision of this License is held to be unenforceable, such
+   provision shall be reformed only to the extent necessary to make it
+   enforceable. This License shall be governed by the law of the jurisdiction
+   specified in a notice contained within the Original Software (except to the
+   extent applicable law, if any, provides otherwise), excluding such
+   jurisdiction's conflict-of-law provisions. Any litigation relating to this
+   License shall be subject to the jurisdiction of the courts located in the
+   jurisdiction and venue specified in a notice contained within the Original
+   Software, with the losing party responsible for costs, including, without
+   limitation, court costs and reasonable attorneys. fees and expenses. The
+   application of the United Nations Convention on Contracts for the
+   International Sale of Goods is expressly excluded. Any law or regulation
+   which provides that the language of a contract shall be construed against
+   the drafter shall not apply to this License. You agree that You alone are
+   responsible for compliance with the United States export administration
+   regulations (and the export control laws and regulation of any other
+   countries) when You use, distribute or otherwise make available any Covered
+   Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+   As between Initial Developer and the Contributors, each party is responsible
+   for claims and damages arising, directly or indirectly, out of its
+   utilization of rights under this License and You agree to work with Initial
+   Developer and Contributors to distribute such responsibility on an equitable
+   basis. Nothing herein is intended or shall be deemed to constitute any
+   admission of liability.
+
+   NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+   LICENSE (CDDL)
+
+   The code released under the CDDL shall be governed by the laws of the State
+   of California (excluding conflict-of-law provisions). Any litigation relating
+   to this License shall be subject to the jurisdiction of the Federal Courts of
+   the Northern District of California and the state courts of the State of
+   California, with venue lying in Santa Clara County, California.
+

+ 19 - 0
NOTICE

@@ -0,0 +1,19 @@
+MaxKey单点登录认证系统,谐音为马克思的钥匙,寓意是最大钥匙,是业界领先的企业级IAM身份管理和身份认证产品;
+支持OAuth 2.x/OpenID Connect、SAML 2.0、JWT、CAS、SCIM等标准协议;
+提供简单、标准、安全和开放的用户身份管理(IDM)、身份认证(AM)、单点登录(SSO)、资源管理和权限管理等
+
+Maxkey Single Sign On system, which means the Maximum key, Leading-Edge Enterprise-Class IAM Identity and Access management product , 
+Support OAuth 2.x/OPENID CONNECT, SAML 2.0, JWT, CAS, SCIM and other standard protocols,
+Provide Simple, Standard, Secure and Open Identity management (IDM), Access management (AM), Single Sign On (SSO), RBAC permission management and Resource management.
+
+MaxKey声明/Maxkey Declaration
+
+可直接商用无需授权,必须保留本作品及源码中的所有版权、专利、商标和归属声明。
+It can be used directly without authorization. All copyrights, patents, trademarks and ownership statements in the product and source code must be retained.
+
+页脚中归属声明及版权声明不可忽略,否则视为侵权
+The attribution statement and copyright notice in the footer cannot be ignored, otherwise it will be deemed as infringement.
+
+Copyright  http://www.maxkey.top  All Rights Reserved.
+
+License http://www.maxkey.top/zh/about/licenses.html

+ 634 - 0
ReleaseNotes.txt

@@ -0,0 +1,634 @@
+MaxKey v 3.1.1 GA 2021/1*/**
+    *(MAXKEY-210901) 腾讯iOA零信任产品适配
+    *(MAXKEY-210902) docker部署完善和文档优化
+    *(MAXKEY-210903) docker-compose支持和文档
+    *(MAXKEY-210904) SCIM2优化
+    *(MAXKEY-210905) 机构和用户Excel导入优化
+    *(MAXKEY-210906) 认证服务下拉菜单bug修复
+    *(MAXKEY-210907) 增加账号策略的功能
+    *(MAXKEY-210908) 状态检查management.health.mail.enabled=false
+    *(MAXKEY-210909) 图片验证码分离
+    *(MAXKEY-210910) 缓存功能优化
+    *(MAXKEY-210911) 独立任务MaxKeyMgtJobs
+    *(MAXKEY-210912) 管理端左侧菜单问题修复
+    *(MAXKEY-210913) 修改WebContext.getBean方法,返回类对象
+    *(MAXKEY-210914) 认证失败超过最大次数锁定时间问题修复
+    *(MAXKEY-210915) platform.common.js优化
+    *(MAXKEY-210916) CAS单点登录符号问题调整
+    *(MAXKEY-210917) 接口调用认证拦截优化
+    *(MAXKEY-210918) APP加载空问题修复
+    *(MAXKEY-210919) OAuth2 token支持GET方法
+    *(MAXKEY-210920) OAuth2 client_credentials模式优化
+    *(MAXKEY-210921) 依赖jar引用、更新和升级
+         spring              5.3.13
+         springData          2.5.7
+         springkafka         2.7.8
+         springbootadmin     2.5.4
+         jodatime            2.10.13
+         mybatis-jpa-extra   2.6.1
+    
+MaxKey v 3.1.0 GA 2021/11/03
+    *(MAXKEY-210801) OAuth 2.1及PKCE支持
+    *(MAXKEY-210802) bootstrap升级到5.1.2
+    *(MAXKEY-210803) 缓存切换成Caffeine
+    *(MAXKEY-210804) 代码初步兼容JDK 17
+    *(MAXKEY-210805) 配置文件参数的整合
+    *(MAXKEY-210806) SDK 客户端代码优化
+    *(MAXKEY-210807) 官方网站优化
+    *(MAXKEY-210808) 界面UI优化
+    *(MAXKEY-210809) 下拉菜单优化
+    *(MAXKEY-210810) 日志优化
+    *(MAXKEY-210811) 密码修改问题修复
+    *(MAXKEY-210812) 环境变量参数优化
+    *(MAXKEY-210813) 管理端图标显示修复
+    *(MAXKEY-210814) 认证系统菜单项调整
+    *(MAXKEY-210815) OAuth的数据库加载增加本地缓存
+    *(MAXKEY-210816) 社交账号登录改为存储在数据库中,方便用户更改
+    *(MAXKEY-210817) 账号策略管理及动态适配
+    *(MAXKEY-210818) 社交账号登录过程优化
+    *(MAXKEY-210819) 调整了机构显示树的样式
+    *(MAXKEY-210820) 企业微信扫码登录js更新wwLogin-1.2.4.js
+    *(MAXKEY-210821) 中文切换调整为下拉菜单
+    *(MAXKEY-210822) 移除原有的缓存方案
+    *(MAXKEY-210823) 应用管理OAuth适配器显示问题修复
+    *(MAXKEY-210824) 图片验证码优化,增加随机颜色的字符生成实现,干扰线优化
+    *(MAXKEY-210825) 菜单名称的调整
+    *(MAXKEY-210826) JS脚本整合优化
+    *(MAXKEY-210827) 机构关系映射
+    *(MAXKEY-210828) 登录失败信息提示优化
+    *(MAXKEY-210829) 机构namepath重组
+    *(MAXKEY-210830) HttpRequestAdapter支持JSON
+    *(MAXKEY-210831) OAuth2 从客户端引导空指针修复
+    *(MAXKEY-210832) Demo问题修复
+    *(MAXKEY-210833) 依赖jar引用、更新和升级
+         spring              5.3.12
+         springboot          2.5.6
+         tomcat              9.0.54
+         springSecurity      5.5.3
+         springData          2.5.5
+         springSession       2.5.3
+         mybatis-jpa-extra   2.6
+         druid               1.2.8
+         caffeine            2.9.2
+         jaxbcore            3.0.2
+         jaxbimpl            3.0.2
+         jaxbxjc             3.0.2
+
+MaxKey v 3.0.0 GA 2021/09/29
+    *(MAXKEY-210701) 好雨科技Rainbond适配,实现基于Rainbond应用商店的快速部署
+    *(MAXKEY-210702) 制定MaxKey技术路线图
+    *(MAXKEY-210703) CHINER元数建模构建MaxKEY ER模型完善,数据库字段说明完善
+    *(MAXKEY-210704) Nacos配置中心支持,可选支持本地和Nacos配置中心配置,配置更加灵活
+    *(MAXKEY-210705) springcloud &springcloud alibaba微服务支持
+    *(MAXKEY-210706) spring cloud gateway支持
+    *(MAXKEY-210707) application.properties参数调整和优化,支持外部Docker及环境变量的配置
+    *(MAXKEY-210708) 同步器定时任务功能优化
+    *(MAXKEY-210709) mgt增加会话管理功能
+    *(MAXKEY-210710) mgt报表功能优化
+    *(MAXKEY-210711) SAML ID调整为MXK_开头,修复类型匹配的bug,增加常用的用户字段
+    *(MAXKEY-210712) JWT单点登录的权限控制,修复bug
+    *(MAXKEY-210713) Gradle升级7.2
+    *(MAXKEY-210714) Gradle 标准、JAR、Docker编译打包脚本优化
+    *(MAXKEY-210715) Shell启动脚本优化
+    *(MAXKEY-210716) 新增MySql Docker支持及初始化脚本
+    *(MAXKEY-210717) Readme优化,增加MaxKey Docker的仓库地址
+    *(MAXKEY-210718) 产品介绍pdf的优化
+    *(MAXKEY-210719) mgt批量删除的优化
+    *(MAXKEY-210720) Jira SAML集成指南
+    *(MAXKEY-210721) 官方网站内容的优化,增加同类产品的比较,用户构建指南,完善集成应用列表
+    *(MAXKEY-210722) 日志信息的完善,包括登录过程日志,初始化日志,单点登录日志等
+    *(MAXKEY-210723) mgt登录错误提示信息
+    *(MAXKEY-210724) 警告提示信息修复
+    *(MAXKEY-210725) 工具类增强和优化
+    *(MAXKEY-210726) 登录认证优化,增加密码策略应用和验证
+    *(MAXKEY-210727) CAS登录中参数回传的修复,增加'#'停止符的优化
+    *(MAXKEY-210728) StringUtils优化,直接继承org.apache.commons.lang3.StringUtils,增加自有逻辑
+    *(MAXKEY-210729) 依赖jar引用、更新和升级
+        spring              5.3.10
+        springBoot          2.5.5
+        springkafka         2.7.7
+        spring-cloud        3.0.4
+        springcloudalibabacspl 1.8.2
+        mybatis-jpa-extra   2.5
+        tomcat              9.0.53
+        kafkaclients        2.8.1
+        jibGradlePlugin     3.1.4
+        gson                2.8.8
+        mysqlconnector      8.0.26
+        jedis               3.7.0
+        ehcache             3.9.6
+        nacos               2.0.3
+        jacksonVersion      2.12.5
+        httpasyncclient     4.1.4
+        bouncycastle        1.69
+        JustAuth            1.16.4
+    
+MaxKey v 2.9.0 GA 2021/08/24
+    *(MAXKEY-210601) 企业微信扫描登录
+    *(MAXKEY-210602) 钉钉扫描登录
+    *(MAXKEY-210603) 第三方登录异常问题修复
+    *(MAXKEY-210604) 新建maxkey-webs目录,包含maxkey-web-maxkey、maxkey-web-mgt、maxkey-web-resources、maxkey-boot-monitor
+    *(MAXKEY-210605) 静态文件的合并到maxkey-web-resources
+    *(MAXKEY-210606) 腾讯企业邮箱适配器优化
+    *(MAXKEY-210607) 移除*.xml的spring配置文件
+    *(MAXKEY-210608) 后台管理员自动生成密码的问题修复
+    *(MAXKEY-210609) 密码重置接口的优化
+    *(MAXKEY-210610) KAFKA数据同步接口优化,重新定义同步TOPIC
+    *(MAXKEY-210611) LDAP及ActiveDirectory属性和连接的优化
+    *(MAXKEY-210612) Synchronizers同步器的模块化,分成activedirectory、ldap、dingding、workweixin
+    *(MAXKEY-210613) Synchronizers增加定时同步功能
+    *(MAXKEY-210614) 后台用户和机构查询排序优化
+    *(MAXKEY-210615) 增加连接器日志查询
+    *(MAXKEY-210616) 增加同步器日志查询
+    *(MAXKEY-210617) 应用配置适配器不生效修复
+    *(MAXKEY-210618) FormBased认证功能的优化
+    *(MAXKEY-210619) FormBased密码首次初始化问题修复
+    *(MAXKEY-210620) 重新登录地址优化
+    *(MAXKEY-210621) 实体类型的ID全部调整为雪花ID
+    *(MAXKEY-210622) 后台报表优化
+    *(MAXKEY-210623) 底层数据库mybatis-jpa-extra优化及问题修复
+    *(MAXKEY-210624) 登录模块的模块化
+    *(MAXKEY-210625) LDAP登录成功,密码自动同步到MaxKey
+    *(MAXKEY-210626) 社交账号企业微信LOGO
+    *(MAXKEY-210627) 找回密码时密码不匹配问题修复
+    *(MAXKEY-210628) SHELL脚本优化
+    *(MAXKEY-210629) 官方网站优化
+    *(MAXKEY-210630) 标准构建优化
+    *(MAXKEY-210631) maxkey-web-mgt配置文件分离,方便后续不同环境的切换
+    *(MAXKEY-210632) 密码过期,当密码错误时,跳转到密码过期页面错误问题,流程:密码验证正确,然后跳转密码过期界面
+    *(MAXKEY-210633) 登录密码错误n次,n小于设定的次数,后一次登录密码正确,设置密码错误次数为0
+    *(MAXKEY-210634) CAS参数优化及认证参数bug修复
+    *(MAXKEY-210635) Redis集群时OAUTH2登录Approval空值bug修复
+    *(MAXKEY-210636) maxkey-boot-monitor Spring Boot Admin服务监控 
+    *(MAXKEY-210637) 用户会话管理及优化
+    *(MAXKEY-210638) 会话结束事件监听控制管理
+    *(MAXKEY-210639) 定时任务功能优化
+    *(MAXKEY-210640) 登录时间,注销时间等相关时间不一致修复
+    *(MAXKEY-210641) 统一用户在线会话ID和在线令牌
+    *(MAXKEY-210642) 字段uid统一改为userid
+    *(MAXKEY-210643) CHINER元数建模ER模型设计
+    *(MAXKEY-210644) 依赖jar引用、更新和升级
+        spring              5.3.9
+        springBoot          2.5.4
+        springSession       2.5.2
+        springSecurity      2.5.2
+        springData          2.5.2
+        springkafka         2.7.6
+        JustAuth            1.16.3
+        kafkaclients        2.6.2
+        tomcat              9.0.52
+        gson                2.8.7
+        jbosslogging        3.4.2.Final
+        hibernate           7.0.1.Final
+        swaggerV3           2.1.10
+        knife4j             3.0.3
+        druid               1.2.6
+        jedis               3.6.3
+        ehcache             3.9.5
+        slf4j               1.7.32
+        jackson             2.12.4
+        fastjson            1.2.78
+        jodatime            2.10.10
+        snakeyaml           1.29
+        mybatis-jpa-extra   2.4
+        
+        
+MaxKey v 2.8.1 GA 2021/06/25
+    *(MAXKEY-210501) 官方网站内容优化
+    *(MAXKEY-210502) 修复同步器LDAP保存保存问题
+    *(MAXKEY-210503) ReadMe内容优化
+    *(MAXKEY-210504) 依赖jar引用、更新和升级
+        spring          5.3.8
+        springBoot      2.5.1
+        springSecurity  5.5.1
+        JustAuth        1.16.1
+
+MaxKey v 2.8.0 GA 2021/06/18
+    *(MAXKEY-210401) 国产数据库瀚高DB的适配
+    *(MAXKEY-210402) 增加手机登录功能,用户可获取手机验证码完成登录
+    *(MAXKEY-210403) 同步器支持,定义标准的机构和用户接口,方便其他系统同步机构和用户信息
+    *(MAXKEY-210404) Microsoft Active Directory 机构和用户同步支持
+    *(MAXKEY-210405) 标准LDAP协议服务器机构和用户同步支持
+    *(MAXKEY-210406) Gradle 7支持
+    *(MAXKEY-210407) 数据库底层适配优化支持,id采用雪花算法
+    *(MAXKEY-210408) 用户注册功能优化,修复脚本错误
+    *(MAXKEY-210409) 登录界面优化及调整
+    *(MAXKEY-210410) 单点登录认证页面及脚本整合及优化
+    *(MAXKEY-210411) 登录超时退出优化
+    *(MAXKEY-210412) org.maxkey.domain调整为org.maxkey.entity
+    *(MAXKEY-210413) 数据查询SQL语句改成小写
+    *(MAXKEY-210414) OAuth2.0单点登录确认界面配置优化
+    *(MAXKEY-210415) 应用配置保存时logoutUrl和logoutType丢失修复
+    *(MAXKEY-210416) 同步器历史同步日志审计功能
+    *(MAXKEY-210417) 删除json2form插件,优化CSS,整合javacript脚本
+    *(MAXKEY-210418) 增加用户状态USERSTATE的属性(在职、退休、离职等),status用做活动/锁定/禁用等状态
+    *(MAXKEY-210419) 分离角色权限管理模块,未来和其他系统集成适配,实现权限的统一管理
+    *(MAXKEY-210420) 模板布局优化及段落注释说明
+    *(MAXKEY-210421) 优化启动脚本,解决长度过长问题
+    *(MAXKEY-210422) 构建时依赖问题修复
+    *(MAXKEY-210423) 官方网站优化,修复有误内容
+    *(MAXKEY-210424) 项目使用jars的版本及协议的更新
+    *(MAXKEY-210425) 依赖jar的版本统一配置gradle.properties
+    *(MAXKEY-210426) 依赖jar引用、更新和升级
+        spring 5.3.8
+        springBoot 2.5.1
+        springSecurity 5.5.0
+        tomcat 9.0.46
+        jibGradle 2.7.1
+        springData 2.5.1
+        springSession 2.5.0
+        druid 1.2.5
+        jedis 3.6.0
+        mybatis 3.5.7
+
+MaxKey v 2.8.0 RC1  2021/06/01
+    *(MAXKEY-210401)  国产数据库瀚高DB的适配
+    *(MAXKEY-210402)  增加手机登录功能,用户可获取手机验证码完成登录
+    *(MAXKEY-210403)  同步器支持,定义标准的机构和用户接口,方便其他系统同步机构和用户信息
+    *(MAXKEY-210404)  Microsoft Active Directory 机构和用户同步支持
+    *(MAXKEY-210405)  标准LDAP协议服务器机构和用户同步支持
+    *(MAXKEY-210406)  Gradle 7支持
+    *(MAXKEY-210407)  数据库底层适配优化支持,id采用雪花算法
+    *(MAXKEY-210408)  用户注册功能优化,修复脚本错误
+    *(MAXKEY-210409)  登录界面优化及调整
+    *(MAXKEY-210410)  单点登录认证页面及脚本整合及优化
+    *(MAXKEY-210411)  登录超时退出优化
+    *(MAXKEY-210412)  org.maxkey.domain调整为org.maxkey.entity
+    *(MAXKEY-210413)  数据查询SQL语句改成小写
+    *(MAXKEY-210414)  OAuth2.0单点登录确认界面配置优化
+    *(MAXKEY-210415)  应用配置保存时logoutUrl和logoutType丢失修复
+    *(MAXKEY-210416)  同步器历史同步日志审计功能
+    *(MAXKEY-210417)  删除json2form插件,优化CSS,整合javacript脚本
+    *(MAXKEY-210418)  增加用户状态USERSTATE的属性(在职、退休、离职等),status用做活动/锁定/禁用等状态
+    *(MAXKEY-210419)  分离角色权限管理模块,未来和其他系统集成适配,实现权限的统一管理
+    *(MAXKEY-210420)  模板布局优化及段落注释说明
+    *(MAXKEY-210421)  优化启动脚本,解决长度过长问题
+    *(MAXKEY-210422)  构建时依赖问题修复
+    *(MAXKEY-210423)  依赖jar的版本统一配置gradle.properties
+    *(MAXKEY-210424)  依赖jar引用、更新和升级
+        spring          5.3.7
+        springBoot      2.4.5
+        springSecurity  5.5.0
+        tomcat          9.0.46
+        jibGradle       2.7.1
+        springData      2.5.1
+        springSession   2.5.0
+        druid           1.2.5
+        jedis           3.6.0
+        mybatis         3.5.7
+
+MaxKey v 2.7.0 GA   2021/04/15
+    *(MAXKEY-210301)  加入Dromara开源组织,官方网站的优化,文档优化
+    *(MAXKEY-210302)  BootJar,Docker,Standard三种打包方式的配置优化
+    *(MAXKEY-210303)  openldap,activedirectory密码验证支持
+    *(MAXKEY-210304)  数据库访问注释由@Service改为@Repository
+    *(MAXKEY-210305)  cas logout优化支持
+    *(MAXKEY-210306)  CAS单点注销及返回数据类型适配器的优化
+    *(MAXKEY-210307)  CAS返回数据类重构
+    *(MAXKEY-210308)  CAS地址优化统一配置到常量类CasConstants
+    *(MAXKEY-210309)  注销空指针异常BUG
+    *(MAXKEY-210310)  OAuth2地址优化统一配置常量类OAuth2Constants
+    *(MAXKEY-210311)  OAuth2 Token多次调用时认证转换的BUG
+    *(MAXKEY-210312)  ExtendApi标准优化
+    *(MAXKEY-210313)  增加基于时间签名的ExtendApi适配器
+    *(MAXKEY-210314)  返回数据Constants整合
+    *(MAXKEY-210315)  扩展数据配置优化
+    *(MAXKEY-210316)  LDAP和MS AD固定属性Constants
+    *(MAXKEY-210317)  SpringSecurity OAuth 2客户端登录适配
+    *(MAXKEY-210318)  移除Desktop的支持,后续可以开发FormBase的适配器定制
+    *(MAXKEY-210319)  application.properties profiles的优化,不同环境启动更加简单
+    *(MAXKEY-210320)  删除maxkey.properties,配置整合到 application.properties
+    *(MAXKEY-210321)  增加适配器注册功能,在配置应用时只需选择对应的适配器
+    *(MAXKEY-210322)  增加Synchronizer接口同步的功能
+    *(MAXKEY-210323)  增加TimeBased OTP接口支持
+    *(MAXKEY-210324)  XSS安全防护功能
+    *(MAXKEY-210325)  禅道项目管理系统单点登录适配
+    *(MAXKEY-210326)  GitLab单点登录适配
+    *(MAXKEY-210327)  云速邮箱单点登录适配
+    *(MAXKEY-210328)  JumpServer开源堡垒机单点登录适配
+    *(MAXKEY-210329)  华为云单点登录适配
+    *(MAXKEY-210330)  Jenkins单点登录适配
+    *(MAXKEY-210331)  通知公告简单功能实现
+    *(MAXKEY-210332)  查询参数优化
+    *(MAXKEY-210333)  SDK优化
+    *(MAXKEY-210334)  依赖jar引用、更新和升级
+        log4j       2.14.1
+        spring      5.3.6
+        springBoot  2.4.4
+        springSecurity 5.4.6
+        tomcat      9.0.44
+    
+MaxKey v 2.6.0 GA   2021/03/05
+    *(MAXKEY-210201)  官方网站的优化
+    *(MAXKEY-210202)  CAS代理模式实现的优化,完成demo的测试
+    *(MAXKEY-210203)  CAS代理模式Demo开发和实现
+    *(MAXKEY-210204)  LINUX版安装指南优化,升级MySQL到8.0
+    *(MAXKEY-210205)  构建优化,实现自动打包到Build Release
+    *(MAXKEY-210206)  springboot-actuator优化
+    *(MAXKEY-210207)  登录模式的拆分和整合
+    *(MAXKEY-210208)  模块的重组和优化,拆分出通用模块maxkey-common,captcha,otp,social等
+    *(MAXKEY-210209)  REST API优化,增加密码修改功能
+    *(MAXKEY-210210)  session及cookie参数的优化
+    *(MAXKEY-210211)  kafka供应服务移动到org.maxkey.persistence.kafka
+    *(MAXKEY-210212)  用户注册功能优化
+    *(MAXKEY-210213)  日志信息输出优化
+    *(MAXKEY-210214)  简化MaxKey banner输出
+    *(MAXKEY-210215)  token工厂模式的实现Factorys
+    *(MAXKEY-210216)  OTP的优化
+    *(MAXKEY-210217)  MapperScan重复优化
+    *(MAXKEY-210218)  maxkey-mgt端口号调整9527,wiki端口号调整9521
+    *(MAXKEY-210219)  依赖jar引用、更新和升级
+        spring           5.3.4
+        springBoot       2.4.3
+        springSecurity   5.4.5
+        tomcat           9.0.41
+        freemarker       2.3.31
+        kafka-clients    2.6.1
+        spring-kafka     2.6.6
+        micrometer       1.6.4
+        latencyutils     2.0.3
+        stax2-api        4.2.1
+        druid            1.2.5
+        
+
+MaxKey v 2.5.0 GA   2021/02/05
+    *(MAXKEY-210101)  动态用户组实现优化,增加时间段控制
+    *(MAXKEY-210102)  官方网站优化,取消加载动态图表;增加统计功能
+    *(MAXKEY-210103)  优化社交登录的图标
+    *(MAXKEY-210104)  社交账号支持Gitee和微信
+    *(MAXKEY-210105)  社交账号绑定列表化,显示绑定时间和最近登录时间,绑定的操作,支持多个OAuth第三方,参见JustAuth
+    *(MAXKEY-210106)  语言选择位置调整
+    *(MAXKEY-210107)  短信验证码存储Redis修复
+    *(MAXKEY-210108)  OAuthDetail修复Visible
+    *(MAXKEY-210109)   镜像加速gradle默认使用阿里云aliyun 
+    *(MAXKEY-210110)  Swagger文档支持 maxkey/swagger-ui/index.html#/
+    *(MAXKEY-210111)  knife4j文档支持 maxkey/doc.html
+    *(MAXKEY-210112)  登录界面加密处理
+    *(MAXKEY-210113)   依赖jar引用、更新和升级
+        spring      5.3.3
+        springBoot  2.4.2
+        jedis       3.4.1
+        druid       1.2.4
+        JustAuth    1.15.9
+        joda-time   2.10.9
+        zxing       3.4.1
+        jackson     2.12.1
+        guava       30.1-jre
+        mybatis     3.5.6
+        mybatis-spring  2.0.6
+        hibernate   6.2.0.Final
+        jibGradlePlugin 2.7.0
+        nimbus-jose-jwt 9.4.1
+        tomcat-embed-core   9.0.41
+        swagger     1.6.2
+        swagger3    2.1.6
+        springfox   3.0.0
+        knife4j     3.0.2
+    
+MaxKey v 2.4.0 GA   2021/01/01
+    *(MAXKEY-201001)  动态用户组实现(基于用户属性或机构)
+    *(MAXKEY-201002)  任职机构和兼职机构
+    *(MAXKEY-201003)  登录会话切换的优化
+    *(MAXKEY-201004)  我的应用界面隐藏visible = 0的应用
+    *(MAXKEY-201005)  构建脚本的优化和更新
+    *(MAXKEY-201006)  全新的版本号定义,正式版本jar不再添加 RELEASE 后缀声明,author由shimingxy改为maxkeyTop
+    *(MAXKEY-201007)  SAML2.0 SP登录引导的优化
+    *(MAXKEY-201008)  SAML2.0 SP DEMO,案例参见 https://github.com/MaxKeyTop/spring-boot-security-saml-sample
+    *(MAXKEY-201009)  docker支持的优化
+    *(MAXKEY-201010)  源代码增加LICENSE声明
+    *(MAXKEY-201011)  JWT的分离成protocols下子项目
+    *(MAXKEY-201012)  密码策略提示参数问题修复
+    *(MAXKEY-201013)  SAML 2.0 Metadata优化
+    *(MAXKEY-201014)  HandlerInterceptorAdapter@deprecated  调整为 AsyncHandlerInterceptor 
+    *(MAXKEY-201015)  mybatis-jpa升级,添加@Entity和@Transient支持,优化update时字段为null的处理,SQL代码优化 
+    *(MAXKEY-201016)  README更新及中文和英文支持
+    *(MAXKEY-201017)  认证失败时,authentication 空指针异常
+    *(MAXKEY-201018)  SAML Metadata URL配置读取
+    *(MAXKEY-201019)  添加组和角色时按登录名查询成员
+    *(MAXKEY-201020)  firefox点击验证码无更新修复
+    *(MAXKEY-201021)  官网内容更新
+    *(MAXKEY-201022)  管理MGT样式调整优化
+    *(MAXKEY-201023)  OAuth2.0 password认证失败是返回异常问题
+    *(MAXKEY-201024)  OAuth2.0 password获取用户信息,类型无法转换错误
+    *(MAXKEY-201025)  依赖jar引用、更新和升级
+        not-yet-commons-ssl 0.3.9
+        log4j               2.14.0
+        spring              5.3.2
+        springBoot          2.4.1
+        springSecurity      5.4.1
+        springData          2.4.1
+        springSession       2.4.1
+        mybatis-jpa-extra   2.2
+        opensaml            2.6.6
+        
+
+MaxKey v 2.3.0 GA   2020/11/12
+    *(MAXKEY-200901)  基于spring session的集群会话共享功能 
+    *(MAXKEY-200902) 单点注销功能,应用可以配置为NONE/BACK_CHANNEL/FRONT_CHANNEL三种方式,支持CAS/SAML/Default
+    *(MAXKEY-200903)  用户在线实时更新功能
+    *(MAXKEY-200904)  定制用户模板,实现批量Excel用户导入功能
+    *(MAXKEY-200905)   定制机构模板,实现批量Excel机构导入功能
+    *(MAXKEY-200906)  用户注册功能
+    *(MAXKEY-200907)  用户状态修改
+    *(MAXKEY-200908)  用户详情显示问题
+    *(MAXKEY-200909)  应用修改时数字大于4为长度格式化问题
+    *(MAXKEY-200910)  注销后,点击重新登陆跳转问题
+    *(MAXKEY-200911)  增加SP登录跳转功能,支持knox的认证
+    *(MAXKEY-200912)  构建脚本的优化和更新
+    *(MAXKEY-200913)  管理员权限控制 RoleAdministrators 
+    *(MAXKEY-200914)  社交账号登录优化
+    *(MAXKEY-200915)  列表界面中未”选择“情况下,弹出界面错误
+    *(MAXKEY-200916) jib(docker) 支持 ,感谢https://github.com/alanland
+    *(MAXKEY-200917)  登录过程的优化
+    *(MAXKEY-200918)  认证的优化,支持@Principal的注入
+    *(MAXKEY-200919) 应用单点登录时,用户访问权限控制
+    *(MAXKEY-200920) maxkey-mgt 项目配置文件的验证码启用不启用配置未生效
+    *(MAXKEY-200921) 登录图标改进
+    *(MAXKEY-200922)  官方网站的优化
+    *(MAXKEY-200923)  依赖jar引用、更新和升级
+        druid 1.2.1
+        JustAuth 1.15.8
+        simple-http 1.0.3
+        spring-session 2.3.1.RELEASE
+        druid-spring-boot-starter 1.2.1
+        xmlbeans  3.0.1
+        commons-compress 1.20
+        poi 4.1.2
+        commons-collections4 4.4
+ 
+MaxKey v 2.2.0 GA   2020/09/24
+    *(MAXKEY-200801)  官方网站内容调整,初步增加英文版支持,增加新闻、合作伙伴及与CAS等开源产品对比
+    *(MAXKEY-200802)  国际化I18N内容优化
+    *(MAXKEY-200803)  使用Passay增强密码策略,分离静态密码策略和动态密码策略
+    *(MAXKEY-200804)  修复登录失败的提示消息,支持国际化
+    *(MAXKEY-200805)  密码@Deprecated从spring移到maxkey并去掉@Deprecated
+    *(MAXKEY-200806)  默认管理员登录名和密码admin/maxkey
+    *(MAXKEY-200807)  优化密码修改的过程,增加密码策略匹配及提示消息
+    *(MAXKEY-200808)  密码错误次数大于6次后,超过设定时间自动解锁
+    *(MAXKEY-200809)  修复初始化密码和密码过期修改后错误问题
+    *(MAXKEY-200810)  修复SHAREDSECRET为空令牌显示报错
+    *(MAXKEY-200811)  登录代码优化与整合
+    *(MAXKEY-200812)  优化开发集成指南
+    *(MAXKEY-200813)  删除冗余的文件和文件夹
+    *(MAXKEY-200814)  优化应用适配器支持
+    *(MAXKEY-200815)  Maven版本支持
+    *(MAXKEY-200816)  CAS REST-Protocol支持及客户端demo
+    *(MAXKEY-200817)  修复CAS返回参数为空时BASE64编码报错
+    *(MAXKEY-200818)  修复CAS SERVICE参数过长的不一致问题,截取与数据参数等长,然后比较
+    *(MAXKEY-200819)  CAS协议增加自定义参数回传
+    *(MAXKEY-200820)  CAS spring boot demo
+    *(MAXKEY-200821)  MGT管理访问找不到页面修复
+    *(MAXKEY-200822)  MGT管理密码修改增加自动密码生成
+    *(MAXKEY-200823)  优化TOKENBASED令牌内容的配置
+    *(MAXKEY-200824)  修复OAuth 2.0管理端的跳过确认提示不能修改
+    *(MAXKEY-200825)  应用管理修改时关闭修正
+    *(MAXKEY-200826)  MGT管理首页统计优化
+    *(MAXKEY-200827)  审计查询功能优化
+    *(MAXKEY-200828)  修复日期控件显示问题
+    *(MAXKEY-200829)  SCIM 2服务端功能优化
+    *(MAXKEY-200830)  注销时的跳转修复
+    *(MAXKEY-200831)  MySQL时间问题,参见https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html
+    *(MAXKEY-200832)  OAuth2 Password模式修复
+    *(MAXKEY-200833)  MGT管理SAML上传问题、IDP元数据链接优化、主键生成修复、元数据参数配置调整
+    *(MAXKEY-200834)  SAML 2添加多种NameId的支持,支持后缀的配置,NameId支持大小写转换
+    *(MAXKEY-200835)  MGT管理TOKENBASED令牌主键生成修复
+    *(MAXKEY-200836)  依赖jar升级
+                        tomcat 9.0.38
+                        passay 1.6.0
+                        springBootVersion  2.3.4.RELEASE
+                        springVersion   5.2.9.RELEASE
+                        springSecurityVersion   5.4.0
+                        guava  29.0-jre
+                        joda-time 2.10.6
+                        ehcache 3.9.0
+                        alibaba druid 1.1.24
+                        fastjson 1.2.73
+                        jackson 2.11.2
+                        tink 1.4.0
+                        JustAuth 1.15.7
+                        nimbus-jose-jwt 9.0.1
+                        commons-lang3 3.11
+                        commons-io 2.8.0
+                        commons-codec 1.15
+                        hibernate   6.1.5.Final
+                        multiple-select-1.5.2
+    
+    
+MaxKey v 2.1.0 GA   2020/08/01
+    *(MAXKEY-200701)  官方网站升级,清晰简洁的界面,全新的页面导航
+    *(MAXKEY-200702) Mysql升级到8.0.21GA
+    *(MAXKEY-200703) MaxKey认证服务手机支持
+    *(MAXKEY-200704)   取消MaxKey认证系统双端口的启动,解决登录时session不一致问题
+    *(MAXKEY-200705)   强化密码验证的功能,适配多种密码结构
+    *(MAXKEY-200706) RBAC权限功能增强,支持多种资源类型
+    *(MAXKEY-200707) Connector连接器从主项目分离,专注与KAFKA的适配
+    *(MAXKEY-200708) SDK主项目分离,增加用户管理API适配功能
+    *(MAXKEY-200709)  依赖jar升级,消除非必要依赖
+                    spring 5.2.8.RELEASE
+                    springBoot 2.3.2.RELEASE
+                    MySql  8.0.21GA
+                    
+                    
+MaxKey v 2.0.0 GA   2020/07/13 
+    *(MAXKEY-200601) RBAC 基于角色的访问控制(Role-Based Access Control)支持
+    *(MAXKEY-200602) xml配置改为Spring annotation,提升模块间的组件化
+    *(MAXKEY-200603) 管理MGT界面优化及增加菜单图标,认证Maxkey主题切换支持-黑色经典|薄荷清新|激情紫荆
+    *(MAXKEY-200604) 修复用户组访问权限删除问题
+    *(MAXKEY-200605) Javascript验证及AJAX提交优化
+    *(MAXKEY-200606) DAO层整合
+    *(MAXKEY-200607) 社交账号关联调整及优化
+    *(MAXKEY-200608) 数据库表字段的注释修复
+    *(MAXKEY-200609) 官方网站优化
+    *(MAXKEY-200610) properties优化
+    *(MAXKEY-200611) 访问控制修复,访问重定向的问题修复
+    *(MAXKEY-200612) String类型数据转换JSON修复
+    *(MAXKEY-200613) OAuth2授权页面优化,显示目标系统图标和相关授权提示
+    *(MAXKEY-200614) OAuth2 secret修改后登陆错误修复
+    *(MAXKEY-200615) CAS单点登陆后进行验证空指针的异常处理,原因权限调整
+    *(MAXKEY-200616) LINUX操作系统支持
+    *(MAXKEY-200617) 修改测试域名为sso.maxkey.top
+    *(MAXKEY-200618) 修复更新应用时状态问题
+    *(MAXKEY-200619) REST API 机构和用户接口实现
+    *(MAXKEY-200620) 代码优化及命名调整
+    *(MAXKEY-200621) CAS协议增强
+    *(MAXKEY-200622) 机构变更时JSON序列化错误修复
+    *(MAXKEY-200623) 官方网站、SDK、连接器Connectors分离成独立项目
+    *(MAXKEY-200624) 依赖jar升级,消除非必要依赖
+                    spring 5.2.7.RELEASE
+                    springBoot 2.3.1.RELEASE
+                    springSecurity 5.3.2.RELEASE
+                    jackson  2.11.0
+                    log4j 2.13.3
+                    font-awesome 4.7.0
+                    tomcat-embed 9.0.35
+                    mybatis 3.5.5
+                    mybatis-jpa-extra 2.1
+                    tomcat-embed 9.0.36
+                    simple-http 1.0.2
+                    JustAuth  1.15.6
+    
+MaxKey v 1.4.0 GA   2020/05/01  
+    *(MAXKEY-200501) 登录错误修复
+    *(MAXKEY-200502) 登录无验证码登录
+    *(MAXKEY-200503) 短信验证码SMS
+                        腾讯云短信验证码
+                        阿里云短信验证码
+                        网易云信验证码
+    *(MAXKEY-200504) 找回密码,支持邮件找回和短信找回
+    *(MAXKEY-200505) 验证增强,增加算术验证码支持
+                        config/applicationConfig.properties
+                        #text字符验证码,arithmetic算术验证码
+                        config.login.captcha.type=text
+    *(MAXKEY-200506) 修复新增用户时错误
+    *(MAXKEY-200507) 修复操作日志错误
+    *(MAXKEY-200508) 修改应用添加错误,增加不为空验证功能
+    *(MAXKEY-200509) 用户组增加不为空验证功能
+    *(MAXKEY-200510) 机构增加不为空验证功能,排序显示
+    *(MAXKEY-200511) 国际化操作提示
+    *(MAXKEY-200512) SAML2.0增加签名和摘要配置
+    *(MAXKEY-200513) 优化界面,强化提交表单验证功能
+    *(MAXKEY-200514) 官方地址域名解析www.maxkey.top
+    *(MAXKEY-200515) 组件版本升级
+                        mybatis-jpa-extra v2.0
+                        JustAuth 1.15.1
+                        log4j 2.13.2
+                        bootstrap 4.4.1
+                        bootstrap-table v1.16.0
+                        jquery 3.5.0
+
+MaxKey v 1.3.0 GA   2020/04/04  
+    *(MAXKEY-200401) 记住登录修复,RememberMe fix
+    *(MAXKEY-200402) 应用账号配置修复
+    *(MAXKEY-200403) 内部缓存使用改用ehcache,同时支持redis
+    *(MAXKEY-200404) 社交账号登录使用JustAuth 1.14.0,支持更多的第三方社交集成
+    *(MAXKEY-200405) 代码使用checkstyle
+    *(MAXKEY-200406) 完善gradle编译脚本,并升级到gradle-6.0
+    *(MAXKEY-200407) 依赖jar升级,消除非必要依赖
+                        spring->5.2.5.RELEASE,
+                        springBoot->2.2.6.RELEASE
+                        mybatis->3.5.4
+                        log4j->2.13.1
+                        httpcomponents->4.5.12
+    *(MAXKEY-200408) 其他漏洞修正
+
+MaxKey v 1.2.1 GA   2020/02/29   
+    *(MAXKEY-200201) SAML 2.0 optimization,support 阿里云、腾讯云 SSO
+    *(MAXKEY-200202) maxkey-mgt main report
+    *(MAXKEY-200203) APPS ExtraAttr
+    *(MAXKEY-200204) fix ui bugs
+    *(MAXKEY-200205) remove maxkey-jose-jwt
+    *(MAXKEY-200206) dep com.nimbusds nimbus-jose-jwt
+    *(MAXKEY-200207) dep net.jcip jcip-annotations
+    *(MAXKEY-200208) dep net.minidev json-smart
+    *(MAXKEY-200209) dep net.minidev asm 
+    
+MaxKey v 1.2.0 GA   2020/01/18 
+    *(MAXKEY-200101) 升级到bootstrap-4.3.1
+    *(MAXKEY-200102) 升级表格为Bootstrap Table 1.14.2
+    *(MAXKEY-200103) 升级js树插件到zTree-v3.5.40
+    *(MAXKEY-200104) 菜单组件升级为metisMenu-v3.0.4
+    *(MAXKEY-200105) 修复系统错误
+    *(MAXKEY-200105) 修复日志的输出
+    
+MaxKey v 1.0 GA     2019/12/06  
+    *(MAXKEY-191201) 基于SpringBoot重新构建1.0 GA 

+ 443 - 0
build.gradle

@@ -0,0 +1,443 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.
+ */
+ 
+/*
+ * MaxKey build file was auto generated by running the Gradle release.bat
+ */
+
+defaultTasks "clean", "build"
+
+//Version define
+ext {
+	
+}
+
+configurations.all {
+	transitive = false// 为本依赖关闭依赖传递特性
+}
+
+//add support for Java
+//apply plugin: 'java'
+allprojects {
+    apply plugin: "java"
+    apply plugin: "eclipse"
+    //apply plugin: "pmd"
+    //apply plugin: "findbugs"
+    //apply plugin: "jdepend"
+    
+	configurations.all {
+		transitive = false// 为本依赖关闭依赖传递特性
+	}	
+	//java Version
+	sourceCompatibility = 1.8
+	targetCompatibility	= 1.8
+	compileJava.options.encoding = 'UTF-8'
+	
+	/*
+	eclipse {
+		第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+		jdt  {
+		    File f = file('.settings/org.eclipse.core.resources.prefs')
+		    f.write('eclipse.preferences.version=1\n')
+		    f.append('encoding/<project>=UTF-8') //use UTF-8
+		}
+	}
+	*/
+
+    
+}
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+}
+
+// In this section you declare where to find the dependencies of your project
+repositories {
+    // Use 'jcenter' for resolving your dependencies.
+    // You can declare any Maven/Ivy/file repository here.
+    mavenCentral()
+    
+}
+
+
+
+subprojects {  
+	/*
+	eclipse {
+		第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+		jdt  {
+		    File f = file('.settings/org.eclipse.core.resources.prefs')
+		    f.write('eclipse.preferences.version=1\n')
+		    f.append('encoding/<project>=UTF-8') //use UTF-8
+		}
+	}
+	*/
+	processResources {
+		from ('src/main/resources') {
+	    	include 'src/main/resources/*.*'
+	  	}
+	}
+			
+	sourceSets {
+	    main {
+	        java {
+	            srcDir 'src/main/java' // 指定源码目录
+	        }
+	   	 }
+	}
+	
+	repositories {  
+        mavenLocal()
+        maven { url "https://maven.aliyun.com/repository/central/"}
+        maven { url "https://maven.aliyun.com/repository/public/"}
+        maven { url "https://maven.aliyun.com/repository/spring/"}
+        maven { url "https://repo.spring.io/plugins-release/" }
+        maven { url "https://repo.spring.io/milestone" }
+        maven { url "https://repo1.maven.org/maven2/" }
+        maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
+        maven { url "https://mvnrepository.com/repos/central/" }        
+        maven { url "https://jcenter.bintray.com" }
+        maven { url "https://mvn.gt.igexin.com/nexus/content/repositories/releases"}
+        maven { url "https://plugins.gradle.org/m2/" }        
+        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
+        maven { url "https://maven.repository.redhat.com/ga/" }
+        maven { url "https://repository.apache.org/content/repositories/releases/" }
+        mavenCentral()
+    }  
+	
+	//all dependencies
+	dependencies {  
+		//for Test and Compile
+         testImplementation group: 'junit', name: 'junit', version: "${junitVersion}"
+         compileOnly group: 'junit', name: 'junit', version: "${junitVersion}"
+         testImplementation group: 'org.mockito', name: 'mockito-all', version: "${mockitoallVersion}"
+         testImplementation group: 'xmlunit', name: 'xmlunit', version: "${xmlunitVersion}"
+
+         //apache
+         implementation  group: 'commons-beanutils', name: 'commons-beanutils', version: "${commonsbeanutilsVersion}"
+         implementation  group: 'commons-codec', name: 'commons-codec', version: "${commonscodecVersion}"
+         implementation  group: 'commons-collections', name: 'commons-collections', version: "${commonscollectionsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-collections4', version: "${commonscollections4Version}"
+         //implementation  group: 'org.apache.commons', name: 'commons-csv', version: "${commonscsvVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-text', version: "${commonstextVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-dbcp2', version: "${commonsdbcp2Version}"
+         implementation  group: 'commons-dbutils', name: 'commons-dbutils', version: "${commonsdbutilsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-digester3', version: "${commonsdigester3Version}"
+         implementation  group: 'commons-digester', name: 'commons-digester', version: "${commonsdigesterVersion}"
+         implementation  group: 'commons-io', name: 'commons-io', version: "${commonsioVersion}"
+         implementation  group: 'commons-lang', name: 'commons-lang', version: "${commonslangVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-lang3', version: "${commonslang3Version}"
+         implementation  group: 'commons-logging', name: 'commons-logging', version: "${commonsloggingVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-pool2', version: "${commonspool2Version}"
+         implementation  group: 'commons-httpclient', name: 'commons-httpclient', version: "${commonshttpclientVersion}"
+         implementation  group: 'commons-fileupload', name: 'commons-fileupload', version: "${commonsfileuploadVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-email', version: "${commonsemailVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: "${httpasyncclientVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'fluent-hc', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpmime', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore-nio', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.velocity', name: 'velocity', version: "${velocityVersion}"
+         implementation  group: 'velocity', name: 'velocity-dep', version: "${velocitydepVersion}"
+         implementation  group: 'org.freemarker', name: 'freemarker', version: "${freemarkerVersion}"
+         implementation  group: 'org.apache.xmlbeans', name: 'xmlbeans', version:  "${xmlbeansVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-compress', version: "${commonscompressVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-scratchpad', version: "${poiVersion}"
+         //implementation  group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: "${notyetcommonssslVersion}"
+         //tomcat embed Core Tomcat implementation
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: "${tomcatVersion}"
+         //JULI logging implementation for embedded Tomcat
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-logging-juli', version: "${tomcatembedloggingjuliVersion}"
+         //apache logs
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}"
+        //logs
+         implementation  group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
+         implementation  group: 'org.jboss.logging', name: 'jboss-logging', version: "${jbossloggingVersion}"
+         //spring
+         implementation  group: 'org.springframework', name: 'spring-aop', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-beans', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-indexer', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-support', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-expression', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-jms', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-orm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-web', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}"
+         testImplementation  group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
+         
+         //kafka support
+         // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
+         implementation  group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
+         implementation  group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.retry/spring-retry
+         implementation  group: 'org.springframework.retry', name: 'spring-retry', version: "${springretryVersion}"
+         
+         //spring-security
+         implementation  group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}"
+         //srpingboot
+         implementation  group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis-reactive', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: "${springBootVersion}"
+         
+         testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:  "${springBootVersion}"
+         //spring-boot-admin
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-client', version: "${springbootadminVersion}"
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-starter-client', version: "${springbootadminVersion}"
+         //spring-data
+         implementation  group: 'org.springframework.data', name: 'spring-data-commons', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-keyvalue', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-redis', version: "${springDataVersion}"
+         //spring-session
+         implementation  group: 'org.springframework.session', name: 'spring-session-core', version: "${springSessionVersion}"
+         implementation  group: 'org.springframework.session', name: 'spring-session-data-redis', version: "${springSessionVersion}"
+         
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-core', version: "${springplugincoreVersion}"
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-metadata', version: "${springpluginmetadataVersion}"
+         //spring cloud
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-commons', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-context', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: "${springcloudVersion}"
+         //spring-cloud-alibaba
+         implementation  group: 'com.alibaba.spring', name: 'spring-context-support', version: "${springcloudalibabaspringVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-alibaba-commons', version: "${springcloudalibabaVersion}"
+         //alibaba nacos
+         implementation  group: 'com.alibaba.nacos', name: 'nacos-client', version: "${alibabanacosclientVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-discovery', version: "${springcloudalibabaVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-config', version: "${springcloudalibabaVersion}"
+         
+         //saml 
+         implementation  group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"
+         implementation  group: 'org.opensaml', name: 'openws', version: "${openwsVersion}"
+         implementation  group: 'org.opensaml', name: 'xmltooling', version: "${xmltoolingVersion}"
+         implementation  group: 'net.shibboleth.utilities', name: 'java-support', version: "${javasupportVersion}"
+         //jose-jwt
+         implementation  group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: "${nimbusjosejwtVersion}"
+         implementation  group: 'net.jcip', name: 'jcip-annotations', version: "${jcipannotationsVersion}"
+         implementation  group: 'net.minidev', name: 'json-smart', version: "${minidevjsonsmartVersion}"
+         implementation  group: 'net.minidev', name: 'asm', version: "${minidevasmVersion}"
+         //oauth third party JustAuth
+         implementation  group: 'com.xkcoding.http', name: 'simple-http', version: "${simplehttpVersion}"
+         implementation  group: 'me.zhyd.oauth', name: 'JustAuth', version: "${JustAuthVersion}"
+         //common
+         implementation  group: 'org.javassist', name: 'javassist', version: "${javassistVersion}"
+         implementation  group: 'org.owasp.esapi', name: 'esapi', version: "${esapiVersion}"
+         implementation  group: 'com.sun.mail', name: 'javax.mail', version: "${javaxmailVersion}"
+         // https://mvnrepository.com/artifact/org.eclipse.persistence/javax.persistence
+         // for mybatis-jpa-extra
+         implementation  group: 'org.eclipse.persistence', name: 'javax.persistence', version: "${javaxpersistenceVersion}"
+         implementation  group: 'jakarta.persistence', name: 'jakarta.persistence-api', version: '3.0.0'
+         implementation  group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: "${jakartaannotationVersion}"
+         implementation  group: 'jakarta.validation', name: 'jakarta.validation-api', version: "${jakartavalidationapiVersion}"
+         implementation  group: 'javax.activation', name: 'activation', version: "${activationVersion}"
+         implementation  group: 'javax.annotation', name: 'javax.annotation-api', version: "${javaxannotationapiVersion}"
+         implementation  group: 'javax.transaction', name: 'jta', version: "${jtaVersion}"
+         implementation  group: 'javax.transaction', name: 'javax.transaction-api', version: "${javaxtransactionapiVersion}"
+         implementation  group: 'javax.validation', name: 'validation-api', version: "${validationapiVersion}"
+         implementation  group: 'javax.xml', name: 'jsr173', version: "${jsr173Version}"
+         implementation  group: 'javax.xml.bind', name: 'jaxb-api', version: "${jaxbapiVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-core', version: "${jaxbcoreVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-impl', version: "${jaxbimplVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-xjc',  version: "${jaxbxjcVersion}"
+         //crypto
+         implementation  group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: "${bouncycastleVersion}"
+         //google
+         implementation  group: 'com.google.crypto.tink', name: 'tink', version: "${tinkVersion}"
+         //kaptcha
+         implementation  group: 'com.jhlabs', name: 'filters', version: "${jhlabsfiltersVersion}"
+         implementation  group: 'com.github.penggle', name: 'kaptcha', version: "${kaptchaVersion}"
+         //json
+         implementation  group: 'com.google.code.gson', name: 'gson', version: "${gsonVersion}"
+         //reactive
+         implementation  group: 'org.reactivestreams', name: 'reactive-streams', version: "${reactivestreamsVersion}"
+         implementation  group: 'io.projectreactor', name: 'reactor-core', version: "${reactorcoreVersion}"
+         implementation  group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: "${szxcvbnVersion}"
+         //quartz
+         implementation  group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
+         //database
+         implementation  group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
+         implementation  group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
+         implementation  group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
+         implementation  group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
+         implementation  group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
+         //implementation  group: 'org.ehcache', name: 'ehcache', version: "${ehcacheVersion}"
+         //implementation  group: 'org.liquibase', name: 'liquibase-core', version: '4.3.5'
+         implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: "${caffeineVersion}"
+         //mybatis
+         implementation  group: 'org.mybatis', name: 'mybatis', version: "${mybatisVersion}"
+         implementation  group: 'org.mybatis', name: 'mybatis-spring', version: "${mybatisspringVersion}"
+         //hibernate
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate', name: 'hibernate-validator-cdi', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: "${hibernateVersion}"
+         //usefull
+         implementation  group: 'joda-time', name: 'joda-time', version: "${jodatimeVersion}"
+         implementation  group: 'org.yaml', name: 'snakeyaml', version: "${snakeyamlVersion}"
+         implementation  group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: "${nekohtmlVersion}"
+         implementation  group: 'org.jdom', name: 'jdom', version: "${jdomVersion}"
+         implementation  group: 'com.google.zxing', name: 'core', version: "${zxingcoreVersion}"
+         implementation  group: 'com.google.guava', name: 'guava', version: "${guavaVersion}"
+         implementation  group: 'ognl', name: 'ognl', version: "${ognlVersion}"
+         implementation  group: 'cglib', name: 'cglib', version: "${cglibVersion}"
+         implementation  group: 'org.ow2.asm', name: 'asm', version: "${asmVersion}"
+         implementation  group: 'aopalliance', name: 'aopalliance', version: "${aopallianceVersion}"
+         implementation  group: 'org.aspectj', name: 'aspectjtools', version: "${aspectjtoolsVersion}"
+         implementation  group: 'dom4j', name: 'dom4j', version: "${dom4jVersion}"
+         implementation  group: 'xalan', name: 'serializer', version: "${serializerVersion}"
+         implementation  group: 'xml-resolver', name: 'xml-resolver', version: "${xmlresolverVersion}"
+         implementation  group: 'org.apache.santuario', name: 'xmlsec', version: "${xmlsecVersion}"
+         implementation  group: 'org.ogce', name: 'xpp3', version: "${xpp3Version}"
+         implementation  group: 'com.thoughtworks.xstream', name: 'xstream', version: "${xstreamVersion}"
+         implementation  group: 'org.passay', name: 'passay', version: "${passayVersion}"
+         implementation  group: 'io.micrometer', name: 'micrometer-core', version: "${micrometercoreVersion}"
+         implementation  group: 'org.latencyutils', name: 'LatencyUtils', version: "${LatencyUtilsVersion}"
+         implementation  group: 'org.codehaus.woodstox', name: 'stax2-api', version: "${stax2apiVersion}"
+         implementation  group: 'org.reflections', name: 'reflections', version: '0.9.11'
+         implementation  group: 'io.prometheus', name: 'simpleclient', version: '0.5.0'
+         implementation  group: 'com.belerweb', name: 'pinyin4j', version: "${pinyin4jVersion}"
+         
+          //阿里云
+         implementation  group: 'com.aliyun', name: 'aliyun-java-sdk-core', version: "${aliyunjavasdkcoreVersion}"
+         //腾讯云
+         implementation  group: 'com.tencentcloudapi', name: 'tencentcloud-sdk-java', version: "${tencentcloudsdkjavaVersion}"
+         //json
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml', name: 'classmate', version: "${classmateVersion}"
+         implementation  group: 'com.alibaba', name: 'fastjson', version: "${fastjsonVersion}"
+         //docs
+         implementation  group: 'org.mapstruct', name: 'mapstruct', version: "${mapstructVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-annotations', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-models', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-annotations', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-core', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-integration', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-models', version: "${swaggerV3Version}"
+         //springfox
+         implementation  group: 'io.springfox', name: 'springfox-bean-validators', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-core', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-data-rest', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spi', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-oas', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-schema', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger2', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-ui', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-common', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webmvc', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-web', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webflux', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-boot-starter', version: "${springfoxVersion}"
+         //knife4j
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-annotations', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-core', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-mvc', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-ui', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-autoconfigure', version: "${knife4jVersion}"
+        
+         //local jars
+         implementation fileTree(dir: "${rootDir}/maxkey-lib/", include: '*.jar')
+    }
+    
+    jar {  
+
+	    def currentTime = java.time.ZonedDateTime.now()
+	    manifest {
+	        attributes(
+						"Implementation-Title": project.name,
+	                	"Implementation-Vendor": project.vendor,
+	                	"Created-By": project.author,
+	                	"Implementation-Date": currentTime,
+	                	"Implementation-Version": project.version
+	           )
+	    }
+	}
+	
+	task buildRelease()  {
+		dependsOn	assemble
+		//项目名
+		println  "subproject " + project.name + ", group " + project.group +" , version " + project.version
+	}
+
+	assemble.configure { finalizedBy buildRelease }
+}
+
+tasks.register("buildRelease")  {
+	//项目名 项目所在的group version 版本号
+	println  "Root project " + project.name + ", group " + project.group +" , version " + project.version
+	//项目的绝对路径 to 项目的build文件绝对路径
+	println "Root project projectDir " + project.projectDir +" to " + project.buildDir
+}
+
+build.configure { finalizedBy buildRelease }
+
+// In this section you declare the dependencies for your production and test code
+dependencies {
+ 
+}

+ 128 - 0
build_cnf.gradle

@@ -0,0 +1,128 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.
+ */
+ 
+/*
+ * MaxKey build file was auto generated by running the Gradle release.bat
+ */
+
+defaultTasks "clearBuild"
+
+//Version define
+ext {
+	
+}
+
+task clearBuild(){
+	println 'Clear Build MaxKey ... '
+	delete "$rootDir/build.gradle"
+	delete "$rootDir/maxkey-webs/maxkey-web-mgt/build.gradle"
+	delete "$rootDir/maxkey-webs/maxkey-web-maxkey/build.gradle"
+	delete "$rootDir/maxkey-webs/maxkey-gateway/build.gradle"
+}
+
+task configStd(dependsOn:['clearBuild']) {
+	doLast {
+		copy {
+			from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_standard.gradle"
+			into "$rootDir/maxkey-webs/maxkey-web-mgt/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		copy {
+			from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_standard.gradle"
+			into "$rootDir/maxkey-webs/maxkey-web-maxkey/"
+			rename { String fileName -> 'build.gradle' }
+		}
+
+		copy {
+			from "$rootDir/maxkey-gateway/config/build_standard.gradle"
+			into "$rootDir/maxkey-gateway/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		copy {
+			from "$rootDir/config/build_standard.gradle"
+			into "$rootDir/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		
+		println 'Standard Build MaxKey .'
+	}
+}
+
+
+task configDocker(dependsOn:['clearBuild']) {
+	doLast {
+		copy {
+			from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_docker.gradle"
+			into "$rootDir/maxkey-webs/maxkey-web-mgt/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		copy {
+			from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_docker.gradle"
+			into "$rootDir/maxkey-webs/maxkey-web-maxkey/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		copy {
+			from "$rootDir/maxkey-gateway/config/build_docker.gradle"
+			into "$rootDir/maxkey-gateway/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		
+		copy {
+			from "$rootDir/config/build_docker.gradle"
+			into "$rootDir/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		
+		println 'Docker Build MaxKey .'
+	}
+}
+
+
+
+task configJar(dependsOn:['clearBuild']) {
+	doLast {
+		copy {
+			from "$rootDir/maxkey-webs/maxkey-web-mgt/config/build_jar.gradle"
+			into "$rootDir/maxkey-webs/maxkey-web-mgt/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		
+		copy {
+			from "$rootDir/maxkey-webs/maxkey-web-maxkey/config/build_jar.gradle"
+			into "$rootDir/maxkey-webs/maxkey-web-maxkey/"
+			rename { String fileName -> 'build.gradle' }
+		}
+
+		copy {
+			from "$rootDir/maxkey-gateway/config/build_jar.gradle"
+			into "$rootDir/maxkey-gateway/"
+			rename { String fileName -> 'build.gradle' }
+		}
+		
+		copy {
+			from "$rootDir/config/build_jar.gradle"
+			into "$rootDir/"
+			rename { String fileName -> 'build.gradle' }
+		}
+
+		println 'Java Jar Build MaxKey .'
+	}
+}
+
+// In this section you declare the dependencies for your production and test code
+dependencies {
+ 
+}

+ 324 - 0
checkstyle/checkstyle-rules.xml

@@ -0,0 +1,324 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+          "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
+          "https://checkstyle.org/dtds/configuration_1_3.dtd">
+ 
+<!--
+    Checkstyle configuration that checks the Google coding conventions from Google Java Style
+    that can be found at https://google.github.io/styleguide/javaguide.html
+    Checkstyle is very configurable. Be sure to read the documentation at
+    http://checkstyle.org (or in your downloaded distribution).
+    To completely disable a check, just comment it out or delete it from the file.
+    To suppress certain violations please review suppression filters.
+    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
+ -->
+
+<module name = "Checker">
+    <property name="charset" value="UTF-8"/>
+
+    <property name="severity" value="warning"/>
+
+    <property name="fileExtensions" value="java, properties, xml"/>
+    <!-- Excludes all 'module-info.java' files              -->
+    <!-- See https://checkstyle.org/config_filefilters.html -->
+    <module name="BeforeExecutionExclusionFileFilter">
+        <property name="fileNamePattern" value="module\-info\.java$"/>
+    </module>
+    <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
+    <module name="SuppressionFilter">
+        <property name="file" value="${org.checkstyle.google.suppressionfilter.config}"
+                  default="checkstyle-suppressions.xml" />
+        <property name="optional" value="true"/>
+    </module>
+
+    <!-- Checks for whitespace                               -->
+    <!-- See http://checkstyle.org/config_whitespace.html -->
+    <module name="FileTabCharacter">
+        <property name="eachLine" value="true"/>
+    </module>
+
+    <module name="LineLength">
+        <property name="fileExtensions" value="java"/>
+        <property name="max" value="100"/>
+        <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+    </module>
+
+    <module name="TreeWalker">
+        <module name="OuterTypeFilename"/>
+        <module name="IllegalTokenText">
+            <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
+            <property name="format"
+             value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
+            <property name="message"
+             value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
+        </module>
+        <module name="AvoidEscapedUnicodeCharacters">
+            <property name="allowEscapesForControlCharacters" value="true"/>
+            <property name="allowByTailComment" value="true"/>
+            <property name="allowNonPrintableEscapes" value="true"/>
+        </module>
+        <module name="AvoidStarImport"/>
+        <module name="OneTopLevelClass"/>
+        <module name="NoLineWrap">
+            <property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT"/>
+        </module>
+        <module name="EmptyBlock">
+            <property name="option" value="TEXT"/>
+            <property name="tokens"
+             value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
+        </module>
+        <module name="NeedBraces">
+            <property name="tokens"
+             value="LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_IF, LITERAL_WHILE"/>
+        </module>
+        <module name="LeftCurly">
+            <property name="tokens"
+             value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF,
+                    INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT,
+                    LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF,
+                    LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF,
+                    OBJBLOCK, STATIC_INIT"/>
+        </module>
+        <module name="RightCurly">
+            <property name="id" value="RightCurlySame"/>
+            <property name="tokens"
+             value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
+                    LITERAL_DO"/>
+        </module>
+        <module name="RightCurly">
+            <property name="id" value="RightCurlyAlone"/>
+            <property name="option" value="alone"/>
+            <property name="tokens"
+             value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
+                    INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF"/>
+        </module>
+        <module name="SuppressionXpathSingleFilter">
+          <!-- suppresion is required till https://github.com/checkstyle/checkstyle/issues/7541 -->
+          <property name="id" value="RightCurlyAlone"/>
+          <property name="query" value="//RCURLY[parent::SLIST[count(./*)=1]
+                                                 or preceding-sibling::*[last()][self::LCURLY]]"/>
+        </module>
+        <module name="WhitespaceAround">
+            <property name="allowEmptyConstructors" value="true"/>
+            <property name="allowEmptyLambdas" value="true"/>
+            <property name="allowEmptyMethods" value="true"/>
+            <property name="allowEmptyTypes" value="true"/>
+            <property name="allowEmptyLoops" value="true"/>
+            <property name="tokens"
+             value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR,
+                    BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND,
+                    LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
+                    LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED,
+                     LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN,
+                     NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
+                     SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
+            <message key="ws.notFollowed"
+             value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
+            <message key="ws.notPreceded"
+             value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
+        </module>
+        <module name="OneStatementPerLine"/>
+        <module name="MultipleVariableDeclarations"/>
+        <module name="ArrayTypeStyle"/>
+        <module name="MissingSwitchDefault"/>
+        <module name="FallThrough"/>
+        <module name="UpperEll"/>
+        <module name="ModifierOrder"/>
+        <module name="EmptyLineSeparator">
+            <property name="tokens"
+             value="PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF,
+                    STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
+            <property name="allowNoEmptyLineBetweenFields" value="true"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapDot"/>
+            <property name="tokens" value="DOT"/>
+            <property name="option" value="nl"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapComma"/>
+            <property name="tokens" value="COMMA"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="SeparatorWrap">
+            <!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
+            <property name="id" value="SeparatorWrapEllipsis"/>
+            <property name="tokens" value="ELLIPSIS"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="SeparatorWrap">
+            <!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
+            <property name="id" value="SeparatorWrapArrayDeclarator"/>
+            <property name="tokens" value="ARRAY_DECLARATOR"/>
+            <property name="option" value="EOL"/>
+        </module>
+        <module name="SeparatorWrap">
+            <property name="id" value="SeparatorWrapMethodRef"/>
+            <property name="tokens" value="METHOD_REF"/>
+            <property name="option" value="nl"/>
+        </module>
+        <module name="PackageName">
+            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+            <message key="name.invalidPattern"
+             value="Package name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="TypeName">
+            <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF"/>
+            <message key="name.invalidPattern"
+             value="Type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="MemberName">
+            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
+            <message key="name.invalidPattern"
+             value="Member name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="ParameterName">
+            <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+            <message key="name.invalidPattern"
+             value="Parameter name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="LambdaParameterName">
+            <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+            <message key="name.invalidPattern"
+                     value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="CatchParameterName">
+            <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+            <message key="name.invalidPattern"
+             value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="LocalVariableName">
+            <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
+            <message key="name.invalidPattern"
+             value="Local variable name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="ClassTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Class type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="MethodTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Method type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="InterfaceTypeParameterName">
+            <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
+            <message key="name.invalidPattern"
+             value="Interface type name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="NoFinalizer"/>
+        <module name="GenericWhitespace">
+            <message key="ws.followed"
+             value="GenericWhitespace ''{0}'' is followed by whitespace."/>
+            <message key="ws.preceded"
+             value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
+            <message key="ws.illegalFollow"
+             value="GenericWhitespace ''{0}'' should followed by whitespace."/>
+            <message key="ws.notPreceded"
+             value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
+        </module>
+        <module name="Indentation">
+            <property name="basicOffset" value="4"/>
+            <property name="braceAdjustment" value="0"/>
+            <property name="caseIndent" value="4"/>
+            <property name="throwsIndent" value="8"/>
+            <property name="lineWrappingIndentation" value="8"/>
+            <property name="arrayInitIndent" value="4"/>
+        </module>
+        <module name="AbbreviationAsWordInName">
+            <property name="ignoreFinal" value="false"/>
+            <property name="allowedAbbreviationLength" value="1"/>
+            <property name="tokens"
+             value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF, ANNOTATION_FIELD_DEF,
+                    PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF"/>
+        </module>
+        <module name="OverloadMethodsDeclarationOrder"/>
+        <module name="VariableDeclarationUsageDistance"/>
+        <module name="CustomImportOrder">
+            <property name="sortImportsInGroupAlphabetically" value="true"/>
+            <property name="separateLineBetweenGroups" value="true"/>
+            <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
+            <property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF"/>
+        </module>
+        <module name="MethodParamPad">
+            <property name="tokens"
+             value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF,
+                    SUPER_CTOR_CALL, ENUM_CONSTANT_DEF"/>
+        </module>
+        <module name="NoWhitespaceBefore">
+            <property name="tokens"
+             value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
+            <property name="allowLineBreaks" value="true"/>
+        </module>
+        <module name="ParenPad">
+            <property name="tokens"
+             value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF,
+                    EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW,
+                    LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL,
+                    METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA"/>
+        </module>
+        <module name="OperatorWrap">
+            <property name="option" value="NL"/>
+            <property name="tokens"
+             value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
+                    LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
+        </module>
+        <module name="AnnotationLocation">
+            <property name="id" value="AnnotationLocationMostCases"/>
+            <property name="tokens"
+             value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
+        </module>
+        <module name="AnnotationLocation">
+            <property name="id" value="AnnotationLocationVariables"/>
+            <property name="tokens" value="VARIABLE_DEF"/>
+            <property name="allowSamelineMultipleAnnotations" value="true"/>
+        </module>
+        <module name="NonEmptyAtclauseDescription"/>
+        <module name="InvalidJavadocPosition"/>
+        <module name="JavadocTagContinuationIndentation"/>
+        <module name="SummaryJavadoc">
+            <property name="forbiddenSummaryFragments"
+             value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
+        </module>
+        <module name="JavadocParagraph"/>
+        <module name="AtclauseOrder">
+            <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
+            <property name="target"
+             value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
+        </module>
+        <module name="JavadocMethod">
+            <property name="scope" value="public"/>
+            <property name="allowMissingParamTags" value="true"/>
+            <property name="allowMissingReturnTag" value="true"/>
+            <property name="allowedAnnotations" value="Override, Test"/>
+            <property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
+        </module>
+        <module name="MissingJavadocMethod">
+            <property name="scope" value="public"/>
+            <property name="minLineCount" value="2"/>
+            <property name="allowedAnnotations" value="Override, Test"/>
+            <property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF"/>
+        </module>
+        <module name="MethodName">
+            <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
+            <message key="name.invalidPattern"
+             value="Method name ''{0}'' must match pattern ''{1}''."/>
+        </module>
+        <module name="SingleLineJavadoc">
+            <property name="ignoreInlineTags" value="false"/>
+        </module>
+        <module name="EmptyCatchBlock">
+            <property name="exceptionVariableName" value="expected"/>
+        </module>
+        <module name="CommentsIndentation">
+            <property name="tokens" value="SINGLE_LINE_COMMENT, BLOCK_COMMENT_BEGIN"/>
+        </module>
+        <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
+        <module name="SuppressionXpathFilter">
+            <property name="file" value="${org.checkstyle.google.suppressionxpathfilter.config}"
+                      default="checkstyle-xpath-suppressions.xml" />
+            <property name="optional" value="true"/>
+        </module>
+    </module>
+</module>

+ 443 - 0
config/build_docker.gradle

@@ -0,0 +1,443 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.
+ */
+ 
+/*
+ * MaxKey build file was auto generated by running the Gradle release.bat
+ */
+
+defaultTasks "clean", "build"
+
+//Version define
+ext {
+	
+}
+
+configurations.all {
+	transitive = false// 为本依赖关闭依赖传递特性
+}
+
+//add support for Java
+//apply plugin: 'java'
+allprojects {
+    apply plugin: "java"
+    apply plugin: "eclipse"
+    //apply plugin: "pmd"
+    //apply plugin: "findbugs"
+    //apply plugin: "jdepend"
+    
+	configurations.all {
+		transitive = false// 为本依赖关闭依赖传递特性
+	}	
+	//java Version
+	sourceCompatibility = 1.8
+	targetCompatibility	= 1.8
+	compileJava.options.encoding = 'UTF-8'
+	
+	/*
+	eclipse {
+		第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+		jdt  {
+		    File f = file('.settings/org.eclipse.core.resources.prefs')
+		    f.write('eclipse.preferences.version=1\n')
+		    f.append('encoding/<project>=UTF-8') //use UTF-8
+		}
+	}
+	*/
+
+    
+}
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+}
+
+// In this section you declare where to find the dependencies of your project
+repositories {
+    // Use 'jcenter' for resolving your dependencies.
+    // You can declare any Maven/Ivy/file repository here.
+    mavenCentral()
+    
+}
+
+
+
+subprojects {  
+	/*
+	eclipse {
+		第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+		jdt  {
+		    File f = file('.settings/org.eclipse.core.resources.prefs')
+		    f.write('eclipse.preferences.version=1\n')
+		    f.append('encoding/<project>=UTF-8') //use UTF-8
+		}
+	}
+	*/
+	processResources {
+		from ('src/main/resources') {
+	    	include 'src/main/resources/*.*'
+	  	}
+	}
+			
+	sourceSets {
+	    main {
+	        java {
+	            srcDir 'src/main/java' // 指定源码目录
+	        }
+	   	 }
+	}
+	
+	repositories {  
+        mavenLocal()
+        maven { url "https://maven.aliyun.com/repository/central/"}
+        maven { url "https://maven.aliyun.com/repository/public/"}
+        maven { url "https://maven.aliyun.com/repository/spring/"}
+        maven { url "https://repo.spring.io/plugins-release/" }
+        maven { url "https://repo.spring.io/milestone" }
+        maven { url "https://repo1.maven.org/maven2/" }
+        maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
+        maven { url "https://mvnrepository.com/repos/central/" }        
+        maven { url "https://jcenter.bintray.com" }
+        maven { url "https://mvn.gt.igexin.com/nexus/content/repositories/releases"}
+        maven { url "https://plugins.gradle.org/m2/" }        
+        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
+        maven { url "https://maven.repository.redhat.com/ga/" }
+        maven { url "https://repository.apache.org/content/repositories/releases/" }
+        mavenCentral()
+    }  
+	
+	//all dependencies
+	dependencies {  
+		//for Test and Compile
+         testImplementation group: 'junit', name: 'junit', version: "${junitVersion}"
+         compileOnly group: 'junit', name: 'junit', version: "${junitVersion}"
+         testImplementation group: 'org.mockito', name: 'mockito-all', version: "${mockitoallVersion}"
+         testImplementation group: 'xmlunit', name: 'xmlunit', version: "${xmlunitVersion}"
+
+         //apache
+         implementation  group: 'commons-beanutils', name: 'commons-beanutils', version: "${commonsbeanutilsVersion}"
+         implementation  group: 'commons-codec', name: 'commons-codec', version: "${commonscodecVersion}"
+         implementation  group: 'commons-collections', name: 'commons-collections', version: "${commonscollectionsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-collections4', version: "${commonscollections4Version}"
+         //implementation  group: 'org.apache.commons', name: 'commons-csv', version: "${commonscsvVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-text', version: "${commonstextVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-dbcp2', version: "${commonsdbcp2Version}"
+         implementation  group: 'commons-dbutils', name: 'commons-dbutils', version: "${commonsdbutilsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-digester3', version: "${commonsdigester3Version}"
+         implementation  group: 'commons-digester', name: 'commons-digester', version: "${commonsdigesterVersion}"
+         implementation  group: 'commons-io', name: 'commons-io', version: "${commonsioVersion}"
+         implementation  group: 'commons-lang', name: 'commons-lang', version: "${commonslangVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-lang3', version: "${commonslang3Version}"
+         implementation  group: 'commons-logging', name: 'commons-logging', version: "${commonsloggingVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-pool2', version: "${commonspool2Version}"
+         implementation  group: 'commons-httpclient', name: 'commons-httpclient', version: "${commonshttpclientVersion}"
+         implementation  group: 'commons-fileupload', name: 'commons-fileupload', version: "${commonsfileuploadVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-email', version: "${commonsemailVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: "${httpasyncclientVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'fluent-hc', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpmime', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore-nio', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.velocity', name: 'velocity', version: "${velocityVersion}"
+         implementation  group: 'velocity', name: 'velocity-dep', version: "${velocitydepVersion}"
+         implementation  group: 'org.freemarker', name: 'freemarker', version: "${freemarkerVersion}"
+         implementation  group: 'org.apache.xmlbeans', name: 'xmlbeans', version:  "${xmlbeansVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-compress', version: "${commonscompressVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-scratchpad', version: "${poiVersion}"
+         //implementation  group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: "${notyetcommonssslVersion}"
+         //tomcat embed Core Tomcat implementation
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: "${tomcatVersion}"
+         //JULI logging implementation for embedded Tomcat
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-logging-juli', version: "${tomcatembedloggingjuliVersion}"
+         //apache logs
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}"
+        //logs
+         implementation  group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
+         implementation  group: 'org.jboss.logging', name: 'jboss-logging', version: "${jbossloggingVersion}"
+         //spring
+         implementation  group: 'org.springframework', name: 'spring-aop', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-beans', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-indexer', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-support', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-expression', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-jms', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-orm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-web', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}"
+         testImplementation  group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
+         
+         //kafka support
+         // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
+         implementation  group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
+         implementation  group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.retry/spring-retry
+         implementation  group: 'org.springframework.retry', name: 'spring-retry', version: "${springretryVersion}"
+         
+         //spring-security
+         implementation  group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}"
+         //srpingboot
+         implementation  group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis-reactive', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: "${springBootVersion}"
+         
+         testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:  "${springBootVersion}"
+         //spring-boot-admin
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-client', version: "${springbootadminVersion}"
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-starter-client', version: "${springbootadminVersion}"
+         //spring-data
+         implementation  group: 'org.springframework.data', name: 'spring-data-commons', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-keyvalue', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-redis', version: "${springDataVersion}"
+         //spring-session
+         implementation  group: 'org.springframework.session', name: 'spring-session-core', version: "${springSessionVersion}"
+         implementation  group: 'org.springframework.session', name: 'spring-session-data-redis', version: "${springSessionVersion}"
+         
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-core', version: "${springplugincoreVersion}"
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-metadata', version: "${springpluginmetadataVersion}"
+         //spring cloud
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-commons', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-context', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: "${springcloudVersion}"
+         //spring-cloud-alibaba
+         implementation  group: 'com.alibaba.spring', name: 'spring-context-support', version: "${springcloudalibabaspringVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-alibaba-commons', version: "${springcloudalibabaVersion}"
+         //alibaba nacos
+         implementation  group: 'com.alibaba.nacos', name: 'nacos-client', version: "${alibabanacosclientVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-discovery', version: "${springcloudalibabaVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-config', version: "${springcloudalibabaVersion}"
+         
+         //saml 
+         implementation  group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"
+         implementation  group: 'org.opensaml', name: 'openws', version: "${openwsVersion}"
+         implementation  group: 'org.opensaml', name: 'xmltooling', version: "${xmltoolingVersion}"
+         implementation  group: 'net.shibboleth.utilities', name: 'java-support', version: "${javasupportVersion}"
+         //jose-jwt
+         implementation  group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: "${nimbusjosejwtVersion}"
+         implementation  group: 'net.jcip', name: 'jcip-annotations', version: "${jcipannotationsVersion}"
+         implementation  group: 'net.minidev', name: 'json-smart', version: "${minidevjsonsmartVersion}"
+         implementation  group: 'net.minidev', name: 'asm', version: "${minidevasmVersion}"
+         //oauth third party JustAuth
+         implementation  group: 'com.xkcoding.http', name: 'simple-http', version: "${simplehttpVersion}"
+         implementation  group: 'me.zhyd.oauth', name: 'JustAuth', version: "${JustAuthVersion}"
+         //common
+         implementation  group: 'org.javassist', name: 'javassist', version: "${javassistVersion}"
+         implementation  group: 'org.owasp.esapi', name: 'esapi', version: "${esapiVersion}"
+         implementation  group: 'com.sun.mail', name: 'javax.mail', version: "${javaxmailVersion}"
+         // https://mvnrepository.com/artifact/org.eclipse.persistence/javax.persistence
+         // for mybatis-jpa-extra
+         implementation  group: 'org.eclipse.persistence', name: 'javax.persistence', version: "${javaxpersistenceVersion}"
+         implementation  group: 'jakarta.persistence', name: 'jakarta.persistence-api', version: '3.0.0'
+         implementation  group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: "${jakartaannotationVersion}"
+         implementation  group: 'jakarta.validation', name: 'jakarta.validation-api', version: "${jakartavalidationapiVersion}"
+         implementation  group: 'javax.activation', name: 'activation', version: "${activationVersion}"
+         implementation  group: 'javax.annotation', name: 'javax.annotation-api', version: "${javaxannotationapiVersion}"
+         implementation  group: 'javax.transaction', name: 'jta', version: "${jtaVersion}"
+         implementation  group: 'javax.transaction', name: 'javax.transaction-api', version: "${javaxtransactionapiVersion}"
+         implementation  group: 'javax.validation', name: 'validation-api', version: "${validationapiVersion}"
+         implementation  group: 'javax.xml', name: 'jsr173', version: "${jsr173Version}"
+         implementation  group: 'javax.xml.bind', name: 'jaxb-api', version: "${jaxbapiVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-core', version: "${jaxbcoreVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-impl', version: "${jaxbimplVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-xjc',  version: "${jaxbxjcVersion}"
+         //crypto
+         implementation  group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: "${bouncycastleVersion}"
+         //google
+         implementation  group: 'com.google.crypto.tink', name: 'tink', version: "${tinkVersion}"
+         //kaptcha
+         implementation  group: 'com.jhlabs', name: 'filters', version: "${jhlabsfiltersVersion}"
+         implementation  group: 'com.github.penggle', name: 'kaptcha', version: "${kaptchaVersion}"
+         //json
+         implementation  group: 'com.google.code.gson', name: 'gson', version: "${gsonVersion}"
+         //reactive
+         implementation  group: 'org.reactivestreams', name: 'reactive-streams', version: "${reactivestreamsVersion}"
+         implementation  group: 'io.projectreactor', name: 'reactor-core', version: "${reactorcoreVersion}"
+         implementation  group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: "${szxcvbnVersion}"
+         //quartz
+         implementation  group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
+         //database
+         implementation  group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
+         implementation  group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
+         implementation  group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
+         implementation  group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
+         implementation  group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
+         //implementation  group: 'org.ehcache', name: 'ehcache', version: "${ehcacheVersion}"
+         //implementation  group: 'org.liquibase', name: 'liquibase-core', version: '4.3.5'
+         implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: "${caffeineVersion}"
+         //mybatis
+         implementation  group: 'org.mybatis', name: 'mybatis', version: "${mybatisVersion}"
+         implementation  group: 'org.mybatis', name: 'mybatis-spring', version: "${mybatisspringVersion}"
+         //hibernate
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate', name: 'hibernate-validator-cdi', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: "${hibernateVersion}"
+         //usefull
+         implementation  group: 'joda-time', name: 'joda-time', version: "${jodatimeVersion}"
+         implementation  group: 'org.yaml', name: 'snakeyaml', version: "${snakeyamlVersion}"
+         implementation  group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: "${nekohtmlVersion}"
+         implementation  group: 'org.jdom', name: 'jdom', version: "${jdomVersion}"
+         implementation  group: 'com.google.zxing', name: 'core', version: "${zxingcoreVersion}"
+         implementation  group: 'com.google.guava', name: 'guava', version: "${guavaVersion}"
+         implementation  group: 'ognl', name: 'ognl', version: "${ognlVersion}"
+         implementation  group: 'cglib', name: 'cglib', version: "${cglibVersion}"
+         implementation  group: 'org.ow2.asm', name: 'asm', version: "${asmVersion}"
+         implementation  group: 'aopalliance', name: 'aopalliance', version: "${aopallianceVersion}"
+         implementation  group: 'org.aspectj', name: 'aspectjtools', version: "${aspectjtoolsVersion}"
+         implementation  group: 'dom4j', name: 'dom4j', version: "${dom4jVersion}"
+         implementation  group: 'xalan', name: 'serializer', version: "${serializerVersion}"
+         implementation  group: 'xml-resolver', name: 'xml-resolver', version: "${xmlresolverVersion}"
+         implementation  group: 'org.apache.santuario', name: 'xmlsec', version: "${xmlsecVersion}"
+         implementation  group: 'org.ogce', name: 'xpp3', version: "${xpp3Version}"
+         implementation  group: 'com.thoughtworks.xstream', name: 'xstream', version: "${xstreamVersion}"
+         implementation  group: 'org.passay', name: 'passay', version: "${passayVersion}"
+         implementation  group: 'io.micrometer', name: 'micrometer-core', version: "${micrometercoreVersion}"
+         implementation  group: 'org.latencyutils', name: 'LatencyUtils', version: "${LatencyUtilsVersion}"
+         implementation  group: 'org.codehaus.woodstox', name: 'stax2-api', version: "${stax2apiVersion}"
+         implementation  group: 'org.reflections', name: 'reflections', version: '0.9.11'
+         implementation  group: 'io.prometheus', name: 'simpleclient', version: '0.5.0'
+         implementation  group: 'com.belerweb', name: 'pinyin4j', version: "${pinyin4jVersion}"
+         
+          //阿里云
+         implementation  group: 'com.aliyun', name: 'aliyun-java-sdk-core', version: "${aliyunjavasdkcoreVersion}"
+         //腾讯云
+         implementation  group: 'com.tencentcloudapi', name: 'tencentcloud-sdk-java', version: "${tencentcloudsdkjavaVersion}"
+         //json
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml', name: 'classmate', version: "${classmateVersion}"
+         implementation  group: 'com.alibaba', name: 'fastjson', version: "${fastjsonVersion}"
+         //docs
+         implementation  group: 'org.mapstruct', name: 'mapstruct', version: "${mapstructVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-annotations', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-models', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-annotations', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-core', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-integration', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-models', version: "${swaggerV3Version}"
+         //springfox
+         implementation  group: 'io.springfox', name: 'springfox-bean-validators', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-core', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-data-rest', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spi', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-oas', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-schema', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger2', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-ui', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-common', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webmvc', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-web', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webflux', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-boot-starter', version: "${springfoxVersion}"
+         //knife4j
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-annotations', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-core', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-mvc', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-ui', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-autoconfigure', version: "${knife4jVersion}"
+        
+         //local jars
+         implementation fileTree(dir: "${rootDir}/maxkey-lib/", include: '*.jar')
+    }
+    
+    jar {  
+
+	    def currentTime = java.time.ZonedDateTime.now()
+	    manifest {
+	        attributes(
+						"Implementation-Title": project.name,
+	                	"Implementation-Vendor": project.vendor,
+	                	"Created-By": project.author,
+	                	"Implementation-Date": currentTime,
+	                	"Implementation-Version": project.version
+	           )
+	    }
+	}
+	
+	task buildRelease()  {
+		dependsOn	assemble
+		//项目名
+		println  "subproject " + project.name + ", group " + project.group +" , version " + project.version
+	}
+
+	assemble.configure { finalizedBy buildRelease }
+}
+
+tasks.register("buildRelease")  {
+	//项目名 项目所在的group version 版本号
+	println  "Root project " + project.name + ", group " + project.group +" , version " + project.version
+	//项目的绝对路径 to 项目的build文件绝对路径
+	println "Root project projectDir " + project.projectDir +" to " + project.buildDir
+}
+
+build.configure { finalizedBy buildRelease }
+
+// In this section you declare the dependencies for your production and test code
+dependencies {
+ 
+}

+ 444 - 0
config/build_jar.gradle

@@ -0,0 +1,444 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.
+ */
+ 
+/*
+ * MaxKey build file was auto generated by running the Gradle release.bat
+ */
+
+defaultTasks "clean", "build"
+
+//Version define
+ext {
+	
+}
+
+configurations.all {
+	transitive = false// 为本依赖关闭依赖传递特性
+}
+
+//add support for Java
+//apply plugin: 'java'
+allprojects {
+    apply plugin: "java"
+    apply plugin: "eclipse"
+    //apply plugin: "pmd"
+    //apply plugin: "findbugs"
+    //apply plugin: "jdepend"
+    
+	configurations.all {
+		transitive = false// 为本依赖关闭依赖传递特性
+	}	
+	//java Version
+	sourceCompatibility = 1.8
+	targetCompatibility	= 1.8
+	compileJava.options.encoding = 'UTF-8'
+	
+	/*
+	eclipse {
+		第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+		jdt  {
+		    File f = file('.settings/org.eclipse.core.resources.prefs')
+		    f.write('eclipse.preferences.version=1\n')
+		    f.append('encoding/<project>=UTF-8') //use UTF-8
+		}
+	}
+	*/
+
+    
+}
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+}
+
+// In this section you declare where to find the dependencies of your project
+repositories {
+    // Use 'jcenter' for resolving your dependencies.
+    // You can declare any Maven/Ivy/file repository here.
+    mavenCentral()
+    jcenter()
+    
+}
+
+
+
+subprojects {  	
+	/*
+	eclipse {
+		第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+		jdt  {
+		    File f = file('.settings/org.eclipse.core.resources.prefs')
+		    f.write('eclipse.preferences.version=1\n')
+		    f.append('encoding/<project>=UTF-8') //use UTF-8
+		}
+	}
+	*/
+	processResources {
+		from ('src/main/resources') {
+	    	include 'src/main/resources/*.*'
+	  	}
+	}
+	sourceSets {
+	    main {
+	        java {
+	            srcDir 'src/main/java' // 指定源码目录
+	        }
+	   	 }
+	}
+	
+	repositories {  
+        mavenLocal()
+        maven { url "https://maven.aliyun.com/repository/central/"}
+        maven { url "https://maven.aliyun.com/repository/public/"}
+        maven { url "https://maven.aliyun.com/repository/spring/"}
+        maven { url "https://repo.spring.io/plugins-release/" }
+        maven { url "https://repo.spring.io/milestone" }
+        maven { url "https://repo1.maven.org/maven2/" }
+        maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
+        maven { url "https://mvnrepository.com/repos/central/" }        
+        maven { url "https://jcenter.bintray.com" }
+        maven { url "https://mvn.gt.igexin.com/nexus/content/repositories/releases"}
+        maven { url "https://plugins.gradle.org/m2/" }        
+        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
+        maven { url "https://maven.repository.redhat.com/ga/" }
+        maven { url "https://repository.apache.org/content/repositories/releases/" }
+        mavenCentral()
+    }  
+	
+	//all dependencies
+	dependencies {  
+		//for Test and Compile
+         testImplementation group: 'junit', name: 'junit', version: "${junitVersion}"
+         compileOnly group: 'junit', name: 'junit', version: "${junitVersion}"
+         testImplementation group: 'org.mockito', name: 'mockito-all', version: "${mockitoallVersion}"
+         testImplementation group: 'xmlunit', name: 'xmlunit', version: "${xmlunitVersion}"
+
+         //apache
+         implementation  group: 'commons-beanutils', name: 'commons-beanutils', version: "${commonsbeanutilsVersion}"
+         implementation  group: 'commons-codec', name: 'commons-codec', version: "${commonscodecVersion}"
+         implementation  group: 'commons-collections', name: 'commons-collections', version: "${commonscollectionsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-collections4', version: "${commonscollections4Version}"
+         //implementation  group: 'org.apache.commons', name: 'commons-csv', version: "${commonscsvVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-text', version: "${commonstextVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-dbcp2', version: "${commonsdbcp2Version}"
+         implementation  group: 'commons-dbutils', name: 'commons-dbutils', version: "${commonsdbutilsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-digester3', version: "${commonsdigester3Version}"
+         implementation  group: 'commons-digester', name: 'commons-digester', version: "${commonsdigesterVersion}"
+         implementation  group: 'commons-io', name: 'commons-io', version: "${commonsioVersion}"
+         implementation  group: 'commons-lang', name: 'commons-lang', version: "${commonslangVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-lang3', version: "${commonslang3Version}"
+         implementation  group: 'commons-logging', name: 'commons-logging', version: "${commonsloggingVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-pool2', version: "${commonspool2Version}"
+         implementation  group: 'commons-httpclient', name: 'commons-httpclient', version: "${commonshttpclientVersion}"
+         implementation  group: 'commons-fileupload', name: 'commons-fileupload', version: "${commonsfileuploadVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-email', version: "${commonsemailVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: "${httpasyncclientVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'fluent-hc', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpmime', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore-nio', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.velocity', name: 'velocity', version: "${velocityVersion}"
+         implementation  group: 'velocity', name: 'velocity-dep', version: "${velocitydepVersion}"
+         implementation  group: 'org.freemarker', name: 'freemarker', version: "${freemarkerVersion}"
+         implementation  group: 'org.apache.xmlbeans', name: 'xmlbeans', version:  "${xmlbeansVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-compress', version: "${commonscompressVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-scratchpad', version: "${poiVersion}"
+         //implementation  group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: "${notyetcommonssslVersion}"
+         //tomcat embed Core Tomcat implementation
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: "${tomcatVersion}"
+         //JULI logging implementation for embedded Tomcat
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-logging-juli', version: "${tomcatembedloggingjuliVersion}"
+         //apache logs
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}"
+        //logs
+         implementation  group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
+         implementation  group: 'org.jboss.logging', name: 'jboss-logging', version: "${jbossloggingVersion}"
+         //spring
+         implementation  group: 'org.springframework', name: 'spring-aop', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-beans', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-indexer', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-support', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-expression', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-jms', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-orm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-web', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}"
+         testImplementation  group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
+         
+         //kafka support
+         // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
+         implementation  group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
+         implementation  group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.retry/spring-retry
+         implementation  group: 'org.springframework.retry', name: 'spring-retry', version: "${springretryVersion}"
+         
+         //spring-security
+         implementation  group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}"
+         //srpingboot
+         implementation  group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis-reactive', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: "${springBootVersion}"
+         
+         testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:  "${springBootVersion}"
+         //spring-boot-admin
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-client', version: "${springbootadminVersion}"
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-starter-client', version: "${springbootadminVersion}"
+         //spring-data
+         implementation  group: 'org.springframework.data', name: 'spring-data-commons', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-keyvalue', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-redis', version: "${springDataVersion}"
+         //spring-session
+         implementation  group: 'org.springframework.session', name: 'spring-session-core', version: "${springSessionVersion}"
+         implementation  group: 'org.springframework.session', name: 'spring-session-data-redis', version: "${springSessionVersion}"
+         
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-core', version: "${springplugincoreVersion}"
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-metadata', version: "${springpluginmetadataVersion}"
+         //spring cloud
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-commons', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-context', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: "${springcloudVersion}"
+         //spring-cloud-alibaba
+         implementation  group: 'com.alibaba.spring', name: 'spring-context-support', version: "${springcloudalibabaspringVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-alibaba-commons', version: "${springcloudalibabaVersion}"
+         //alibaba nacos
+         implementation  group: 'com.alibaba.nacos', name: 'nacos-client', version: "${alibabanacosclientVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-discovery', version: "${springcloudalibabaVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-config', version: "${springcloudalibabaVersion}"
+         
+         //saml 
+         implementation  group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"
+         implementation  group: 'org.opensaml', name: 'openws', version: "${openwsVersion}"
+         implementation  group: 'org.opensaml', name: 'xmltooling', version: "${xmltoolingVersion}"
+         implementation  group: 'net.shibboleth.utilities', name: 'java-support', version: "${javasupportVersion}"
+         //jose-jwt
+         implementation  group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: "${nimbusjosejwtVersion}"
+         implementation  group: 'net.jcip', name: 'jcip-annotations', version: "${jcipannotationsVersion}"
+         implementation  group: 'net.minidev', name: 'json-smart', version: "${minidevjsonsmartVersion}"
+         implementation  group: 'net.minidev', name: 'asm', version: "${minidevasmVersion}"
+         //oauth third party JustAuth
+         implementation  group: 'com.xkcoding.http', name: 'simple-http', version: "${simplehttpVersion}"
+         implementation  group: 'me.zhyd.oauth', name: 'JustAuth', version: "${JustAuthVersion}"
+         //common
+         implementation  group: 'org.javassist', name: 'javassist', version: "${javassistVersion}"
+         implementation  group: 'org.owasp.esapi', name: 'esapi', version: "${esapiVersion}"
+         implementation  group: 'com.sun.mail', name: 'javax.mail', version: "${javaxmailVersion}"
+         // https://mvnrepository.com/artifact/org.eclipse.persistence/javax.persistence
+         // for mybatis-jpa-extra
+         implementation  group: 'org.eclipse.persistence', name: 'javax.persistence', version: "${javaxpersistenceVersion}"
+         implementation  group: 'jakarta.persistence', name: 'jakarta.persistence-api', version: '3.0.0'
+         implementation  group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: "${jakartaannotationVersion}"
+         implementation  group: 'jakarta.validation', name: 'jakarta.validation-api', version: "${jakartavalidationapiVersion}"
+         implementation  group: 'javax.activation', name: 'activation', version: "${activationVersion}"
+         implementation  group: 'javax.annotation', name: 'javax.annotation-api', version: "${javaxannotationapiVersion}"
+         implementation  group: 'javax.transaction', name: 'jta', version: "${jtaVersion}"
+         implementation  group: 'javax.transaction', name: 'javax.transaction-api', version: "${javaxtransactionapiVersion}"
+         implementation  group: 'javax.validation', name: 'validation-api', version: "${validationapiVersion}"
+         implementation  group: 'javax.xml', name: 'jsr173', version: "${jsr173Version}"
+         implementation  group: 'javax.xml.bind', name: 'jaxb-api', version: "${jaxbapiVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-core', version: "${jaxbcoreVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-impl', version: "${jaxbimplVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-xjc',  version: "${jaxbxjcVersion}"
+         //crypto
+         implementation  group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: "${bouncycastleVersion}"
+         //google
+         implementation  group: 'com.google.crypto.tink', name: 'tink', version: "${tinkVersion}"
+         //kaptcha
+         implementation  group: 'com.jhlabs', name: 'filters', version: "${jhlabsfiltersVersion}"
+         implementation  group: 'com.github.penggle', name: 'kaptcha', version: "${kaptchaVersion}"
+         //json
+         implementation  group: 'com.google.code.gson', name: 'gson', version: "${gsonVersion}"
+         //reactive
+         implementation  group: 'org.reactivestreams', name: 'reactive-streams', version: "${reactivestreamsVersion}"
+         implementation  group: 'io.projectreactor', name: 'reactor-core', version: "${reactorcoreVersion}"
+         implementation  group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: "${szxcvbnVersion}"
+         //quartz
+         implementation  group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
+         //database
+         implementation  group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
+         implementation  group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
+         implementation  group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
+         implementation  group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
+         implementation  group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
+         //implementation  group: 'org.ehcache', name: 'ehcache', version: "${ehcacheVersion}"
+         //implementation  group: 'org.liquibase', name: 'liquibase-core', version: '4.3.5'
+         implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: "${caffeineVersion}"
+         //mybatis
+         implementation  group: 'org.mybatis', name: 'mybatis', version: "${mybatisVersion}"
+         implementation  group: 'org.mybatis', name: 'mybatis-spring', version: "${mybatisspringVersion}"
+         //hibernate
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate', name: 'hibernate-validator-cdi', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: "${hibernateVersion}"
+         //usefull
+         implementation  group: 'joda-time', name: 'joda-time', version: "${jodatimeVersion}"
+         implementation  group: 'org.yaml', name: 'snakeyaml', version: "${snakeyamlVersion}"
+         implementation  group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: "${nekohtmlVersion}"
+         implementation  group: 'org.jdom', name: 'jdom', version: "${jdomVersion}"
+         implementation  group: 'com.google.zxing', name: 'core', version: "${zxingcoreVersion}"
+         implementation  group: 'com.google.guava', name: 'guava', version: "${guavaVersion}"
+         implementation  group: 'ognl', name: 'ognl', version: "${ognlVersion}"
+         implementation  group: 'cglib', name: 'cglib', version: "${cglibVersion}"
+         implementation  group: 'org.ow2.asm', name: 'asm', version: "${asmVersion}"
+         implementation  group: 'aopalliance', name: 'aopalliance', version: "${aopallianceVersion}"
+         implementation  group: 'org.aspectj', name: 'aspectjtools', version: "${aspectjtoolsVersion}"
+         implementation  group: 'dom4j', name: 'dom4j', version: "${dom4jVersion}"
+         implementation  group: 'xalan', name: 'serializer', version: "${serializerVersion}"
+         implementation  group: 'xml-resolver', name: 'xml-resolver', version: "${xmlresolverVersion}"
+         implementation  group: 'org.apache.santuario', name: 'xmlsec', version: "${xmlsecVersion}"
+         implementation  group: 'org.ogce', name: 'xpp3', version: "${xpp3Version}"
+         implementation  group: 'com.thoughtworks.xstream', name: 'xstream', version: "${xstreamVersion}"
+         implementation  group: 'org.passay', name: 'passay', version: "${passayVersion}"
+         implementation  group: 'io.micrometer', name: 'micrometer-core', version: "${micrometercoreVersion}"
+         implementation  group: 'org.latencyutils', name: 'LatencyUtils', version: "${LatencyUtilsVersion}"
+         implementation  group: 'org.codehaus.woodstox', name: 'stax2-api', version: "${stax2apiVersion}"
+         implementation  group: 'org.reflections', name: 'reflections', version: '0.9.11'
+         implementation  group: 'io.prometheus', name: 'simpleclient', version: '0.5.0'
+         implementation  group: 'com.belerweb', name: 'pinyin4j', version: "${pinyin4jVersion}"
+         
+          //阿里云
+         implementation  group: 'com.aliyun', name: 'aliyun-java-sdk-core', version: "${aliyunjavasdkcoreVersion}"
+         //腾讯云
+         implementation  group: 'com.tencentcloudapi', name: 'tencentcloud-sdk-java', version: "${tencentcloudsdkjavaVersion}"
+         //json
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml', name: 'classmate', version: "${classmateVersion}"
+         implementation  group: 'com.alibaba', name: 'fastjson', version: "${fastjsonVersion}"
+         //docs
+         implementation  group: 'org.mapstruct', name: 'mapstruct', version: "${mapstructVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-annotations', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-models', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-annotations', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-core', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-integration', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-models', version: "${swaggerV3Version}"
+         //springfox
+         implementation  group: 'io.springfox', name: 'springfox-bean-validators', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-core', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-data-rest', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spi', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-oas', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-schema', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger2', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-ui', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-common', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webmvc', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-web', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webflux', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-boot-starter', version: "${springfoxVersion}"
+         //knife4j
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-annotations', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-core', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-mvc', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-ui', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-autoconfigure', version: "${knife4jVersion}"
+        
+         //local jars
+         implementation fileTree(dir: "${rootDir}/maxkey-lib/", include: '*.jar')
+    }
+    
+    jar {  
+
+	    def currentTime = java.time.ZonedDateTime.now()
+	    manifest {
+	        attributes(
+						"Implementation-Title": project.name,
+	                	"Implementation-Vendor": project.vendor,
+	                	"Created-By": project.author,
+	                	"Implementation-Date": currentTime,
+	                	"Implementation-Version": project.version
+	           )
+	    }
+	}
+	
+	task buildRelease()  {
+		dependsOn	assemble
+		//项目名
+		println  "subproject " + project.name + ", group " + project.group +" , version " + project.version
+	}
+	
+	assemble.configure { finalizedBy buildRelease }
+
+}
+
+tasks.register("buildRelease")  {
+    //项目名 项目所在的group version 版本号
+    println  "Root project " + project.name + ", group " + project.group +" , version " + project.version
+    //项目的绝对路径 to 项目的build文件绝对路径
+    println "Root project projectDir " + project.projectDir +" to " + project.buildDir
+}
+
+build.configure { finalizedBy buildRelease }
+
+// In this section you declare the dependencies for your production and test code
+dependencies {
+ 
+}

+ 544 - 0
config/build_standard.gradle

@@ -0,0 +1,544 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.
+ */
+ 
+/*
+ * MaxKey build file was auto generated by running the Gradle release.bat
+ */
+
+defaultTasks "clean", "build"
+
+//Version define
+ext {
+    
+}
+
+def libjarsmapper=[
+    'maxkey-authentication-otp'             :'lib',
+    'maxkey-authentication-captcha'         :'lib',
+    'maxkey-authentication-core'            :'lib',
+    'maxkey-common'                         :'lib',
+    'maxkey-core'                           :'lib',
+    'maxkey-persistence'                    :'lib',
+    'maxkey-protocol-authorize'             :'lib',
+    'maxkey-protocol-cas'                   :'lib',
+    'maxkey-protocol-desktop'               :'lib',
+    'maxkey-protocol-extendapi'             :'lib',
+    'maxkey-protocol-formbased'             :'lib',
+    'maxkey-protocol-jwt'                   :'lib',
+    'maxkey-protocol-oauth-2.0'             :'lib',
+    'maxkey-protocol-saml-2.0'              :'lib',
+    'maxkey-protocol-tokenbased'            :'lib',
+    'maxkey-web-resources'                  :'lib',
+    'maxkey-authentication-social'          :'maxkey',
+    'maxkey-web-maxkey'                     :'maxkey',
+    'maxkey-identity-rest'                  :'maxkey_mgt',
+    'maxkey-identity-scim'                  :'maxkey_mgt',
+    'maxkey-web-mgt'                        :'maxkey_mgt',
+    'maxkey-synchronizers'                  :'maxkey_mgt',
+    'maxkey-synchronizers-activedirectory'  :'maxkey_mgt',
+    'maxkey-synchronizers-ldap'             :'maxkey_mgt',
+    'maxkey-synchronizers-dingding'         :'maxkey_mgt',
+    'maxkey-synchronizers-workweixin'       :'maxkey_mgt',
+	'maxkey-synchronizers-reorgdept'        :'maxkey_mgt',
+    'maxkey-boot-monitor'                   :'maxkey_monitor'
+]
+
+configurations.all {
+    transitive = false// 为本依赖关闭依赖传递特性
+}
+
+//add support for Java
+//apply plugin: 'java'
+allprojects {
+    apply plugin: "java"
+    apply plugin: "eclipse"
+    //apply plugin: "pmd"
+    //apply plugin: "findbugs"
+    //apply plugin: "jdepend"
+    
+    configurations.all {
+        transitive = false// 为本依赖关闭依赖传递特性
+    }   
+    //java Version
+    sourceCompatibility = 1.8
+    targetCompatibility = 1.8
+    compileJava.options.encoding = 'UTF-8'
+    
+    eclipse {
+       /* 第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+        jdt  {
+            File f = file('.settings/org.eclipse.core.resources.prefs')
+            f.write('eclipse.preferences.version=1\n')
+            f.append('encoding/<project>=UTF-8') //use UTF-8
+        }*/
+    }
+    
+
+    
+}
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+}
+
+// In this section you declare where to find the dependencies of your project
+repositories {
+    // Use 'jcenter' for resolving your dependencies.
+    // You can declare any Maven/Ivy/file repository here.
+    mavenCentral()
+    
+}
+
+// In this section you declare the dependencies for your production and test code
+dependencies {
+ 
+}
+
+
+subprojects {
+    /*
+    eclipse {
+        第一次时请注释这段eclipse设置,可能报错,设置工程字符集
+        jdt  {
+            File f = file('.settings/org.eclipse.core.resources.prefs')
+            f.write('eclipse.preferences.version=1\n')
+            f.append('encoding/<project>=UTF-8') //use UTF-8
+        }
+    }
+    */
+    processResources {
+        from ('src/main/resources') {
+            include 'src/main/resources/*.*'
+        }
+    }
+    
+    sourceSets {
+        main {
+            java {
+                srcDir 'src/main/java' // 指定源码目录
+            }
+           
+         }
+    }
+    
+    repositories {  
+        mavenLocal()
+        maven { url "https://maven.aliyun.com/repository/central/"}
+        maven { url "https://maven.aliyun.com/repository/public/"}
+        maven { url "https://maven.aliyun.com/repository/spring/"}
+        maven { url "https://repo.spring.io/plugins-release/" }
+        maven { url "https://repo.spring.io/milestone" }
+        maven { url "https://repo1.maven.org/maven2/" }
+        maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
+        maven { url "https://mvnrepository.com/repos/central/" }        
+        maven { url "https://jcenter.bintray.com" }
+        maven { url "https://mvn.gt.igexin.com/nexus/content/repositories/releases"}
+        maven { url "https://plugins.gradle.org/m2/" }        
+        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
+        maven { url "https://maven.repository.redhat.com/ga/" }
+        maven { url "https://repository.apache.org/content/repositories/releases/" }
+        mavenCentral()
+    }  
+
+    //all dependencies
+    dependencies {
+        
+        //for Test and Compile
+         testImplementation group: 'junit', name: 'junit', version: "${junitVersion}"
+         compileOnly group: 'junit', name: 'junit', version: "${junitVersion}"
+         testImplementation group: 'org.mockito', name: 'mockito-all', version: "${mockitoallVersion}"
+         testImplementation group: 'xmlunit', name: 'xmlunit', version: "${xmlunitVersion}"
+
+         //apache
+         implementation  group: 'commons-beanutils', name: 'commons-beanutils', version: "${commonsbeanutilsVersion}"
+         implementation  group: 'commons-codec', name: 'commons-codec', version: "${commonscodecVersion}"
+         implementation  group: 'commons-collections', name: 'commons-collections', version: "${commonscollectionsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-collections4', version: "${commonscollections4Version}"
+         //implementation  group: 'org.apache.commons', name: 'commons-csv', version: "${commonscsvVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-text', version: "${commonstextVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-dbcp2', version: "${commonsdbcp2Version}"
+         implementation  group: 'commons-dbutils', name: 'commons-dbutils', version: "${commonsdbutilsVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-digester3', version: "${commonsdigester3Version}"
+         implementation  group: 'commons-digester', name: 'commons-digester', version: "${commonsdigesterVersion}"
+         implementation  group: 'commons-io', name: 'commons-io', version: "${commonsioVersion}"
+         implementation  group: 'commons-lang', name: 'commons-lang', version: "${commonslangVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-lang3', version: "${commonslang3Version}"
+         implementation  group: 'commons-logging', name: 'commons-logging', version: "${commonsloggingVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-pool2', version: "${commonspool2Version}"
+         implementation  group: 'commons-httpclient', name: 'commons-httpclient', version: "${commonshttpclientVersion}"
+         implementation  group: 'commons-fileupload', name: 'commons-fileupload', version: "${commonsfileuploadVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-email', version: "${commonsemailVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: "${httpasyncclientVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'fluent-hc', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpmime', version: "${httpcomponentsVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.httpcomponents', name: 'httpcore-nio', version: "${httpcoreVersion}"
+         implementation  group: 'org.apache.velocity', name: 'velocity', version: "${velocityVersion}"
+         implementation  group: 'velocity', name: 'velocity-dep', version: "${velocitydepVersion}"
+         implementation  group: 'org.freemarker', name: 'freemarker', version: "${freemarkerVersion}"
+         implementation  group: 'org.apache.xmlbeans', name: 'xmlbeans', version:  "${xmlbeansVersion}"
+         implementation  group: 'org.apache.commons', name: 'commons-compress', version: "${commonscompressVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: "${poiVersion}"
+         implementation  group: 'org.apache.poi', name: 'poi-scratchpad', version: "${poiVersion}"
+         //implementation  group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: "${notyetcommonssslVersion}"
+         //tomcat embed Core Tomcat implementation
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: "${tomcatVersion}"
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: "${tomcatVersion}"
+         //JULI logging implementation for embedded Tomcat
+         implementation  group: 'org.apache.tomcat.embed', name: 'tomcat-embed-logging-juli', version: "${tomcatembedloggingjuliVersion}"
+         //apache logs
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"
+         implementation  group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}"
+        //logs
+         implementation  group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
+         implementation  group: 'org.jboss.logging', name: 'jboss-logging', version: "${jbossloggingVersion}"
+         //spring
+         implementation  group: 'org.springframework', name: 'spring-aop', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-beans', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-indexer', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-context-support', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-expression', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-jms', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-orm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-web', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}"
+         implementation  group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
+         //implementation  group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}"
+         testImplementation  group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
+         
+         //kafka support
+         // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
+         implementation  group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
+         implementation  group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
+         // https://mvnrepository.com/artifact/org.springframework.retry/spring-retry
+         implementation  group: 'org.springframework.retry', name: 'spring-retry', version: "${springretryVersion}"
+         
+         //spring-security
+         implementation  group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}"
+         implementation  group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}"
+         //srpingboot
+         implementation  group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-actuator-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version:  "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis-reactive', version: "${springBootVersion}"
+         implementation  group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: "${springBootVersion}"
+         
+         testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:  "${springBootVersion}"
+         //spring-boot-admin
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-client', version: "${springbootadminVersion}"
+         implementation group: 'de.codecentric', name: 'spring-boot-admin-starter-client', version: "${springbootadminVersion}"
+         //spring-data
+         implementation  group: 'org.springframework.data', name: 'spring-data-commons', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-keyvalue', version: "${springDataVersion}"
+         implementation  group: 'org.springframework.data', name: 'spring-data-redis', version: "${springDataVersion}"
+         //spring-session
+         implementation  group: 'org.springframework.session', name: 'spring-session-core', version: "${springSessionVersion}"
+         implementation  group: 'org.springframework.session', name: 'spring-session-data-redis', version: "${springSessionVersion}"
+         
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-core', version: "${springplugincoreVersion}"
+         implementation  group: 'org.springframework.plugin', name: 'spring-plugin-metadata', version: "${springpluginmetadataVersion}"
+         //spring cloud
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-commons', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-context', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter', version: "${springcloudVersion}"
+         implementation  group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: "${springcloudVersion}"
+         //spring-cloud-alibaba
+         implementation  group: 'com.alibaba.spring', name: 'spring-context-support', version: "${springcloudalibabaspringVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-alibaba-commons', version: "${springcloudalibabaVersion}"
+         //alibaba nacos
+         implementation  group: 'com.alibaba.nacos', name: 'nacos-client', version: "${alibabanacosclientVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-discovery', version: "${springcloudalibabaVersion}"
+         implementation  group: 'com.alibaba.cloud', name: 'spring-cloud-starter-alibaba-nacos-config', version: "${springcloudalibabaVersion}"
+         
+         //saml 
+         implementation  group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"
+         implementation  group: 'org.opensaml', name: 'openws', version: "${openwsVersion}"
+         implementation  group: 'org.opensaml', name: 'xmltooling', version: "${xmltoolingVersion}"
+         implementation  group: 'net.shibboleth.utilities', name: 'java-support', version: "${javasupportVersion}"
+         //jose-jwt
+         implementation  group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: "${nimbusjosejwtVersion}"
+         implementation  group: 'net.jcip', name: 'jcip-annotations', version: "${jcipannotationsVersion}"
+         implementation  group: 'net.minidev', name: 'json-smart', version: "${minidevjsonsmartVersion}"
+         implementation  group: 'net.minidev', name: 'asm', version: "${minidevasmVersion}"
+         //oauth third party JustAuth
+         implementation  group: 'com.xkcoding.http', name: 'simple-http', version: "${simplehttpVersion}"
+         implementation  group: 'me.zhyd.oauth', name: 'JustAuth', version: "${JustAuthVersion}"
+         //common
+         implementation  group: 'org.javassist', name: 'javassist', version: "${javassistVersion}"
+         implementation  group: 'org.owasp.esapi', name: 'esapi', version: "${esapiVersion}"
+         implementation  group: 'com.sun.mail', name: 'javax.mail', version: "${javaxmailVersion}"
+         // https://mvnrepository.com/artifact/org.eclipse.persistence/javax.persistence
+         // for mybatis-jpa-extra
+         implementation  group: 'org.eclipse.persistence', name: 'javax.persistence', version: "${javaxpersistenceVersion}"
+         implementation  group: 'jakarta.persistence', name: 'jakarta.persistence-api', version: '3.0.0'
+         implementation  group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: "${jakartaannotationVersion}"
+         implementation  group: 'jakarta.validation', name: 'jakarta.validation-api', version: "${jakartavalidationapiVersion}"
+         implementation  group: 'javax.activation', name: 'activation', version: "${activationVersion}"
+         implementation  group: 'javax.annotation', name: 'javax.annotation-api', version: "${javaxannotationapiVersion}"
+         implementation  group: 'javax.transaction', name: 'jta', version: "${jtaVersion}"
+         implementation  group: 'javax.transaction', name: 'javax.transaction-api', version: "${javaxtransactionapiVersion}"
+         implementation  group: 'javax.validation', name: 'validation-api', version: "${validationapiVersion}"
+         implementation  group: 'javax.xml', name: 'jsr173', version: "${jsr173Version}"
+         implementation  group: 'javax.xml.bind', name: 'jaxb-api', version: "${jaxbapiVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-core', version: "${jaxbcoreVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-impl', version: "${jaxbimplVersion}"
+         implementation  group: 'com.sun.xml.bind', name: 'jaxb-xjc',  version: "${jaxbxjcVersion}"
+         //crypto
+         implementation  group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: "${bouncycastleVersion}"
+         implementation  group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: "${bouncycastleVersion}"
+         //google
+         implementation  group: 'com.google.crypto.tink', name: 'tink', version: "${tinkVersion}"
+         //kaptcha
+         implementation  group: 'com.jhlabs', name: 'filters', version: "${jhlabsfiltersVersion}"
+         implementation  group: 'com.github.penggle', name: 'kaptcha', version: "${kaptchaVersion}"
+         //json
+         implementation  group: 'com.google.code.gson', name: 'gson', version: "${gsonVersion}"
+         //reactive
+         implementation  group: 'org.reactivestreams', name: 'reactive-streams', version: "${reactivestreamsVersion}"
+         implementation  group: 'io.projectreactor', name: 'reactor-core', version: "${reactorcoreVersion}"
+         implementation  group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: "${szxcvbnVersion}"
+         //quartz
+         implementation  group: 'org.quartz-scheduler', name: 'quartz', version: "${quartzVersion}"
+         //database
+         implementation  group: 'mysql', name: 'mysql-connector-java', version: "${mysqlconnectorjavaVersion}"
+         implementation  group: 'org.postgresql', name: 'postgresql', version: "${postgresqlVersion}"
+         implementation  group: 'com.alibaba', name: 'druid', version: "${druidVersion}"
+         implementation  group: 'com.alibaba', name: 'druid-spring-boot-starter', version: "${druidspringbootstarterVersion}"
+         implementation  group: 'redis.clients', name: 'jedis', version: "${jedisVersion}"
+         //implementation  group: 'org.ehcache', name: 'ehcache', version: "${ehcacheVersion}"
+         //implementation  group: 'org.liquibase', name: 'liquibase-core', version: '4.3.5'
+         implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: "${caffeineVersion}"
+         //mybatis
+         implementation  group: 'org.mybatis', name: 'mybatis', version: "${mybatisVersion}"
+         implementation  group: 'org.mybatis', name: 'mybatis-spring', version: "${mybatisspringVersion}"
+         //hibernate
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate', name: 'hibernate-validator-cdi', version: "${hibernateVersion}"
+         implementation  group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: "${hibernateVersion}"
+         //usefull
+         implementation  group: 'joda-time', name: 'joda-time', version: "${jodatimeVersion}"
+         implementation  group: 'org.yaml', name: 'snakeyaml', version: "${snakeyamlVersion}"
+         implementation  group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: "${nekohtmlVersion}"
+         implementation  group: 'org.jdom', name: 'jdom', version: "${jdomVersion}"
+         implementation  group: 'com.google.zxing', name: 'core', version: "${zxingcoreVersion}"
+         implementation  group: 'com.google.guava', name: 'guava', version: "${guavaVersion}"
+         implementation  group: 'ognl', name: 'ognl', version: "${ognlVersion}"
+         implementation  group: 'cglib', name: 'cglib', version: "${cglibVersion}"
+         implementation  group: 'org.ow2.asm', name: 'asm', version: "${asmVersion}"
+         implementation  group: 'aopalliance', name: 'aopalliance', version: "${aopallianceVersion}"
+         implementation  group: 'org.aspectj', name: 'aspectjtools', version: "${aspectjtoolsVersion}"
+         implementation  group: 'dom4j', name: 'dom4j', version: "${dom4jVersion}"
+         implementation  group: 'xalan', name: 'serializer', version: "${serializerVersion}"
+         implementation  group: 'xml-resolver', name: 'xml-resolver', version: "${xmlresolverVersion}"
+         implementation  group: 'org.apache.santuario', name: 'xmlsec', version: "${xmlsecVersion}"
+         implementation  group: 'org.ogce', name: 'xpp3', version: "${xpp3Version}"
+         implementation  group: 'com.thoughtworks.xstream', name: 'xstream', version: "${xstreamVersion}"
+         implementation  group: 'org.passay', name: 'passay', version: "${passayVersion}"
+         implementation  group: 'io.micrometer', name: 'micrometer-core', version: "${micrometercoreVersion}"
+         implementation  group: 'org.latencyutils', name: 'LatencyUtils', version: "${LatencyUtilsVersion}"
+         implementation  group: 'org.codehaus.woodstox', name: 'stax2-api', version: "${stax2apiVersion}"
+         implementation  group: 'org.reflections', name: 'reflections', version: '0.9.11'
+         implementation  group: 'io.prometheus', name: 'simpleclient', version: '0.5.0'
+         implementation  group: 'com.belerweb', name: 'pinyin4j', version: "${pinyin4jVersion}"
+         
+          //阿里云
+         implementation  group: 'com.aliyun', name: 'aliyun-java-sdk-core', version: "${aliyunjavasdkcoreVersion}"
+         //腾讯云
+         implementation  group: 'com.tencentcloudapi', name: 'tencentcloud-sdk-java', version: "${tencentcloudsdkjavaVersion}"
+         //json
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: "${jacksonVersion}"
+         implementation  group: 'com.fasterxml', name: 'classmate', version: "${classmateVersion}"
+         implementation  group: 'com.alibaba', name: 'fastjson', version: "${fastjsonVersion}"
+         //docs
+         implementation  group: 'org.mapstruct', name: 'mapstruct', version: "${mapstructVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-annotations', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger', name: 'swagger-models', version: "${swaggerVersion}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-annotations', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-core', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-integration', version: "${swaggerV3Version}"
+         implementation  group: 'io.swagger.core.v3', name: 'swagger-models', version: "${swaggerV3Version}"
+         //springfox
+         implementation  group: 'io.springfox', name: 'springfox-bean-validators', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-core', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-data-rest', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spi', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-oas', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-schema', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger2', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-ui', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-swagger-common', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webmvc', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-web', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-spring-webflux', version: "${springfoxVersion}"
+         implementation  group: 'io.springfox', name: 'springfox-boot-starter', version: "${springfoxVersion}"
+         //knife4j
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-annotations', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-core', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-mvc', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-ui', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: "${knife4jVersion}"
+         implementation  group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-autoconfigure', version: "${knife4jVersion}"
+        
+         //local jars
+         implementation fileTree(dir: "${rootDir}/maxkey-lib/", include: '*.jar')
+    }
+    
+    jar {  
+
+        def currentTime = java.time.ZonedDateTime.now()
+        manifest {
+            attributes(
+                        "Implementation-Title": project.name,
+                        "Implementation-Vendor": project.vendor,
+                        "Created-By": project.author,
+                        "Implementation-Date": currentTime,
+                        "Implementation-Version": project.version
+               )
+        }
+    }
+    
+    tasks.register("buildRelease",Copy) {
+        dependsOn   assemble
+        //项目名 项目所在的group version 版本号
+        println  "subproject " + project.name + ", group " + project.group +" , version " + project.version
+        
+        //copy
+        into "$rootDir/build/maxkey-jars/"
+        from "$buildDir/libs/"
+        include '*.jar'
+    }
+    
+    tasks.register("copyLibJars",Copy) {
+        if (libjarsmapper["${project.name}"] != null){
+              into "$rootDir/build/MaxKey-v${project.version}GA/"+libjarsmapper["${project.name}"]
+              from "$buildDir/libs/"
+              include '*.jar'
+        }
+    }
+    assemble.configure { finalizedBy buildRelease,copyLibJars }
+}
+
+//copy Dep Jars to /build/maxkey-depjars,only maxkey-common deps
+project('maxkey-common')  {
+    task createReleaseDir(type: Copy){
+        def paths = ["$rootDir/build/MaxKey-v${project.version}GA",
+                     "$rootDir/build/MaxKey-v${project.version}GA/maxkey",
+                     "$rootDir/build/MaxKey-v${project.version}GA/maxkey_mgt",
+                     "$rootDir/build/MaxKey-v${project.version}GA/maxkey_monitor",
+                     "$rootDir/build/MaxKey-v${project.version}GA/lib"];
+        //遍历数组,调用createDir闭包,创建目录
+        paths.forEach(){path->
+            File dir=new File(path);
+            if (!dir.exists()){
+                print("create "+path+"\n")
+                dir.mkdirs();
+            }
+        };
+    }
+    
+    task copyDepJars (type: Copy){
+        dependsOn   assemble
+        println  "copy Dep Jars to $rootDir/build/MaxKey-v${project.version}GA/lib"
+        //copy runtime
+        from configurations.runtimeClasspath
+        into "$rootDir/build/MaxKey-v${project.version}GA/lib";
+    }
+    
+    build.configure { finalizedBy copyDepJars }
+}
+
+//copy Dep Jars to /build/maxkey-depjars,only maxkey-boot-monitor deps
+project('maxkey-webs:maxkey-boot-monitor')  {
+    task copyDepJars(type:Copy) {
+        dependsOn   assemble
+        //项目名 项目所在的group version 版本号
+        println  "subproject " + project.name + ", group " + project.group +" , version " + project.version
+        //copy runtime
+        from configurations.runtimeClasspath
+        into "$rootDir/build/MaxKey-v${project.version}GA/maxkey_monitor";
+    }
+    
+    build.configure { finalizedBy copyDepJars }
+}
+
+tasks.register("buildRelease")  {
+    dependsOn 'copyShellScript','copyWindowsShellScript'
+    
+    //项目名 项目所在的group version 版本号
+    println  "Root project " + project.name + ", group " + project.group +" , version " + project.version
+    //项目的绝对路径 to 项目的build文件绝对路径
+    println "Root project projectDir " + project.projectDir +" to " + project.buildDir
+}
+
+tasks.register("copyShellScript",Copy) {
+    println  "project copyMaxKeyShellScript .";
+    
+    from "$rootDir/shellscript/"
+    into "$rootDir/build/MaxKey-v${project.version}GA/shellscript/";
+}
+
+tasks.register("copyWindowsShellScript",Copy) {
+    println  "project copyMaxKeyWindowsShellScript .";
+    from "$rootDir/shellscript/windows"
+    into "$rootDir/build/MaxKey-v${project.version}GA/";
+}
+
+build.configure { finalizedBy buildRelease }

BIN
demo-server/.DS_Store


+ 19 - 0
demo-server/build.gradle

@@ -0,0 +1,19 @@
+plugins {
+    id 'java'
+}
+
+group 'maxkey.top'
+version '3.1.1'
+
+repositories {
+    mavenCentral()
+}
+
+dependencies {
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
+    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
+}
+
+test {
+    useJUnitPlatform()
+}

BIN
demo-server/src/.DS_Store


BIN
demo-server/src/main/.DS_Store


+ 16 - 0
demo-server/src/main/java/com/dm/Controller/DemoController.java

@@ -0,0 +1,16 @@
+package com.dm.Controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/demo")
+public class DemoController
+{
+    @GetMapping("/login")
+    public String login(){
+
+        return "hello demo";
+    }
+}

+ 24 - 0
demo-server/src/main/java/com/dm/DemoApplication.java

@@ -0,0 +1,24 @@
+package com.dm;
+
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+
+
+@SpringBootApplication(
+		exclude={
+				RedisAutoConfiguration.class,
+				DruidDataSourceAutoConfigure.class,
+				DataSourceAutoConfiguration.class
+		})
+@EnableDiscoveryClient
+public class DemoApplication
+{
+
+	public static void main(String[] args) {
+		SpringApplication.run(DemoApplication.class, args);
+	}
+}

+ 10 - 0
demo-server/src/main/resources/application.yml

@@ -0,0 +1,10 @@
+server:
+  port: 8888
+spring:
+  application:
+    name: maxkey-demo
+  cloud:
+    nacos:
+      discovery:
+        server-addr: ${NACOS_DISCOVERY_SERVER_ADDR:127.0.0.1:8848}
+        enabled: ${NACOS_DISCOVERY_ENABLED:true}

+ 12 - 0
demo-server/src/main/resources/bootstrap.properties

@@ -0,0 +1,12 @@
+#nacos config
+spring.cloud.nacos.config.server-addr           =${NACOS_CONFIG_SERVER_ADDR:127.0.0.1:8848}
+# Nacos Console add configuration:
+# Data ID:maxkey.properties
+# Group:DEFAULT_GROUP
+# configuration:useLocalCache=true
+spring.application.name                         =maxkey-demo
+# Suffix for the configuration. Supports properties,yaml,yml,default is properties
+spring.cloud.nacos.config.file-extension        =properties
+#spring.cloud.nacos.config.file-extension=yaml
+#nacos enabled
+spring.cloud.nacos.config.enabled               =${NACOS_CONFIG_ENABLED:true}

+ 34 - 0
demo-server/src/main/resources/log4j2.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>  
+<Configuration status="INFO"  monitorInterval="300">  
+    <Appenders>  
+        <Console name="consolePrint" target="SYSTEM_OUT">  
+            <PatternLayout pattern="%d{YYYY-MM-dd HH:mm:ss,SSS} %-5level [%t] %logger{36}:%L - %msg%n" />  
+        </Console>
+   
+		<!-- 输出到文件,按天或者超过128MB分割  每天进行归档yyyy-MM-dd -->
+		<RollingFile name="RollingFile" fileName="logs/maxkey-boot-admin.log"    filePattern="logs/$${date:yyyyMMdd}/maxkey-boot-admin-%d{yyyy-MM-dd}-%i.log.gz">
+		    <!-- 需要记录的级别 -->
+		 	<!-- <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY" /> -->
+		     <PatternLayout pattern="%d{YYYY-MM-dd HH:mm:ss,SSS} %-5level [%t] %logger{36}:%L - %msg%n" />
+		     <Policies>
+		          <OnStartupTriggeringPolicy />
+		          <TimeBasedTriggeringPolicy />
+		          <SizeBasedTriggeringPolicy size="128 MB" />
+		     </Policies>
+		     <DefaultRolloverStrategy max="100"/>
+		</RollingFile>
+	 </Appenders>  
+	 
+    <Loggers>  
+    	<Logger level="INFO"	name="org.springframework" ></Logger>
+    	<Logger level="INFO"	name="org.apache.logging" ></Logger>
+    	<Logger level="DEBUG"	name="org.maxkey" ></Logger>
+    	<Logger level="ERROR"	name="org.reflections.Reflections" ></Logger>
+    	<Logger level="OFF"     name="org.hibernate.validator.internal.util.Version" ></Logger>
+    	
+        <Root  level="INFO">  
+            <AppenderRef  ref="consolePrint" />
+            <AppenderRef  ref="RollingFile" /> 
+        </Root >  
+    </Loggers>  
+</Configuration>

BIN
docker/.DS_Store


+ 43 - 0
docker/docker-compose.yml

@@ -0,0 +1,43 @@
+version: '3'
+services:
+  mysql:
+    image: maxkey:mysql
+    container_name: mysql
+    build: ./docker-mysql
+    volumes:
+      - /root/mysql/data:/var/lib/mysql 
+      - /root/mysql/logs:/var/log/mysql 
+      - /root/docker-mysql:/etc/mysql/conf.d 
+      - /root/docker-mysql/sql:/docker-entrypoint-initdb.d 
+    environment:
+      - MYSQL_ROOT_PASSWORD=maxkey
+    ports:
+      - "3306:3306"
+    restart: always
+    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
+    
+  maxkey:
+    image: maxkey:maxkey
+    container_name: maxkey
+    build: ./docker-maxkey
+    environment:
+      - DATABASE_HOST:192.168.0.102
+      - DATABASE_PORT:3306
+      - DATABASE_NAME:maxkey
+      - DATABASE_USER:root
+      - DATABASE_PWD:maxkey
+    ports:
+      - "443:443"
+
+  maxkey-mgt:
+    image: maxkey:maxkey-mgt
+    container_name: maxkey-mgt
+    build: ./docker-maxkey-mgt
+    environment:
+      - DATABASE_HOST:192.168.0.102
+      - DATABASE_PORT:3306
+      - DATABASE_NAME:maxkey
+      - DATABASE_USER:root
+      - DATABASE_PWD:maxkey
+    ports:
+      - "9527:9527"

+ 8 - 0
docker/docker-maxkey-mgt/Dockerfile

@@ -0,0 +1,8 @@
+FROM maxkeytop/maxkey-mgt:latest
+
+ENV TZ=Asia/Shanghai \
+    DATABASE_HOST=192.168.0.102 \
+    DATABASE_PORT=3306 \
+    DATABASE_NAME=maxkey \
+    DATABASE_USER=root \
+    DATABASE_PWD=maxkey \

+ 8 - 0
docker/docker-maxkey/Dockerfile

@@ -0,0 +1,8 @@
+FROM maxkeytop/maxkey:latest
+
+ENV TZ=Asia/Shanghai \
+    DATABASE_HOST=192.168.0.102 \
+    DATABASE_PORT=3306 \
+    DATABASE_NAME=maxkey \
+    DATABASE_USER=root \
+    DATABASE_PWD=maxkey \

BIN
docker/docker-mysql/.DS_Store


+ 20 - 0
docker/docker-mysql/Dockerfile

@@ -0,0 +1,20 @@
+FROM mysql:8.0.27
+
+ENV TZ=Asia/Shanghai \
+    MYSQL_DATABASE=maxkey \
+    MYSQL_USER=maxkey \
+    MYSQL_PASSWORD=maxkey \
+    MYSQL_ROOT_PASSWORD=maxkey
+
+
+MAINTAINER maxkey(maxkeysupport@163.com)
+
+VOLUME ["/var/lib/mysql", "/root/mysql/data"]
+VOLUME ["/var/log/mysql", "/root/mysql/logs"]
+
+
+EXPOSE 3306
+
+#如果向 sql 目录中存入了数据库初始化脚本,则把下面的注释打开,脚本支持 .sh, .sql .sql.gz
+COPY sql/ /docker-entrypoint-initdb.d
+COPY mysqld.cnf /etc/mysql/conf.d/mysqld.cnf

+ 201 - 0
docker/docker-mysql/LICENSE

@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

+ 4 - 0
docker/docker-mysql/README.md

@@ -0,0 +1,4 @@
+# 一份用于构建 mysql 镜像的 Dockerfile
+
+- 编辑 my.cnf 来变更配置 
+- 上传 sql 脚本到 sql 目录下,可以在首次启动时初始化数据库

+ 39 - 0
docker/docker-mysql/mysqld.cnf

@@ -0,0 +1,39 @@
+# Percona Server template configuration
+
+[mysqld]
+#
+# Remove leading # and set to the amount of RAM for the most important data
+# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
+# innodb_buffer_pool_size = 128M
+#
+# Remove leading # to turn on a very important data integrity option: logging
+# changes to the binary log between backups.
+# log_bin
+#
+# Remove leading # to set options mainly useful for reporting servers.
+# The server defaults are faster for transactions and fast SELECTs.
+# Adjust sizes as needed, experiment to find the optimal values.
+# join_buffer_size = 128M
+# sort_buffer_size = 2M
+# read_rnd_buffer_size = 2M
+datadir=/var/lib/mysql
+socket=/var/lib/mysql/mysql.sock
+
+character-set-server=utf8
+lower_case_table_names=1
+
+# Disabling symbolic-links is recommended to prevent assorted security risks
+symbolic-links=0
+
+log-error=/var/lib/mysql/error.log
+slow_query_log=on;
+slow-query-log-file=/var/lib/mysql/mysql-slow.log
+pid-file=/var/run/mysqld/mysqld.pid
+
+sql_mode = STRICT_ALL_TABLES,NO_ENGINE_SUBSTITUTION
+
+[mysql]
+default-character-set=utf8
+
+[client]
+default-character-set=utf8

BIN
docker/docker-mysql/sql/.DS_Store


+ 0 - 0
docker/docker-mysql/sql/.keep


+ 7 - 0
docker/docker-mysql/sql/init.sql

@@ -0,0 +1,7 @@
+create database if not exists  `maxkey` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */ ;
+
+use maxkey ;
+
+source /docker-entrypoint-initdb.d/v3.1.1.ga/maxkey_v3.1.1.GA.sql   ;
+source /docker-entrypoint-initdb.d/v3.1.1.ga/maxkey_v3.1.1.GA_data.sql   ;
+ 

+ 3 - 0
docker/docker-mysql/sql/v2.9.0.ga/init_v2.9.0.ga.sql

@@ -0,0 +1,3 @@
+ source /docker-entrypoint-initdb.d/maxkey_v2.9.0.GA.sql   ;
+ source /docker-entrypoint-initdb.d/maxkey_v2.9.0.GA_data.sql   ;
+ 

+ 843 - 0
docker/docker-mysql/sql/v2.9.0.ga/maxkey_v2.9.0.GA.sql

@@ -0,0 +1,843 @@
+CREATE DATABASE  IF NOT EXISTS `maxkey` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
+USE `maxkey`;
+-- MySQL dump 10.13  Distrib 8.0.21, for Win64 (x86_64)
+--
+-- Host: 127.0.0.1    Database: maxkey
+-- ------------------------------------------------------
+-- Server version	8.0.21
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `mxk_accounts`
+--
+
+DROP TABLE IF EXISTS `mxk_accounts`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_accounts` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `USERID` varchar(45) DEFAULT NULL COMMENT '用户ID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT '用户名',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '用户显示名',
+  `APPID` varchar(45) DEFAULT NULL COMMENT '应用ID',
+  `APPNAME` varchar(100) DEFAULT NULL COMMENT '应用名称',
+  `RELATEDUSERNAME` varchar(200) DEFAULT NULL COMMENT '用户名',
+  `RELATEDPASSWORD` varchar(200) DEFAULT NULL COMMENT '密码',
+  `MODIFIEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户账号表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `NAME` varchar(300) NOT NULL COMMENT '应用名称',
+  `LOGINURL` varchar(300) CHARACTER SET cp850 COLLATE cp850_general_ci NOT NULL COMMENT '应用登录地址',
+  `CATEGORY` varchar(45) DEFAULT NULL COMMENT '应用类型',
+  `SECRET` varchar(400) DEFAULT NULL COMMENT '应用密钥',
+  `PROTOCOL` varchar(300) DEFAULT NULL COMMENT '单点登录协议',
+  `ICON` blob COMMENT '应用图标',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '状态',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `VENDOR` varchar(45) DEFAULT NULL COMMENT '供应商',
+  `VENDORURL` varchar(200) DEFAULT NULL COMMENT '供应商地址',
+  `CREDENTIAL` tinyint DEFAULT '0' COMMENT '单点登录凭证类型',
+  `SHAREDUSERNAME` varchar(100) DEFAULT NULL COMMENT '共享用户名',
+  `SHAREDPASSWORD` varchar(400) DEFAULT NULL COMMENT '共享密码',
+  `SYSTEMUSERATTR` varchar(45) DEFAULT NULL COMMENT '系统用户属性',
+  `ISEXTENDATTR` varchar(4) DEFAULT NULL COMMENT '是否支持应用扩展属性',
+  `EXTENDATTR` varchar(4000) DEFAULT NULL COMMENT '应用扩展属性',
+  `SORTINDEX` int unsigned DEFAULT '0' COMMENT '排序序号',
+  `ISSIGNATURE` tinyint DEFAULT '0' COMMENT '签名状态',
+  `VISIBLE` tinyint DEFAULT '0' COMMENT '可见标识',
+  `ISADAPTER` tinyint unsigned DEFAULT '0' COMMENT '是否支持适配器',
+  `ADAPTERID` varchar(45) DEFAULT NULL,
+  `ADAPTERNAME` varchar(100) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL COMMENT '适配器',
+  `PRINCIPAL` varchar(45) DEFAULT NULL COMMENT '接口API用户',
+  `CREDENTIALS` varchar(200) DEFAULT NULL COMMENT '接口API用户凭证',
+  `USERPROPERTYS` varchar(4000) DEFAULT NULL COMMENT '接口返回用户属性定义',
+  `INDUCER` varchar(50) DEFAULT 'IDP' COMMENT '引导方式',
+  `LOGOUTURL` varchar(300) DEFAULT NULL COMMENT '注销地址',
+  `LOGOUTTYPE` int DEFAULT NULL COMMENT '单点注销方式 0 NONE,1 BACK_CHANNEL,2 FRONT_CHANNEL',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_adapters`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_adapters`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_adapters` (
+  `ID` varchar(50) NOT NULL,
+  `NAME` varchar(100) DEFAULT NULL,
+  `PROTOCOL` varchar(300) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ADAPTER';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_cas_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_cas_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_cas_details` (
+  `ID` varchar(45) NOT NULL,
+  `SERVICE` varchar(400) NOT NULL,
+  `CALLBACKURL` varchar(400) NOT NULL,
+  `EXPIRES` int DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_form_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_form_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_form_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `USERNAMEMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN NAME',
+  `PASSWORDMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN PASSWORD',
+  `REDIRECTURI` varchar(400) DEFAULT NULL COMMENT 'REDIRECTURI',
+  `AUTHORIZEVIEW` varchar(100) DEFAULT NULL COMMENT 'AUTHORIZEVIEW FOR LOCAL VIEW DEAL',
+  `passwordalgorithm` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FormBase details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_jwt_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_jwt_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_jwt_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_oauth_client_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_oauth_client_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_oauth_client_details` (
+  `CLIENT_ID` varchar(45) NOT NULL COMMENT 'appkey',
+  `RESOURCE_IDS` varchar(256) DEFAULT NULL COMMENT '资源ids',
+  `CLIENT_SECRET` varchar(256) DEFAULT NULL COMMENT 'appsecret',
+  `SCOPE` varchar(256) DEFAULT NULL COMMENT 'SCOPE',
+  `AUTHORIZED_GRANT_TYPES` varchar(256) DEFAULT NULL COMMENT '授权类型',
+  `WEB_SERVER_REDIRECT_URI` varchar(256) DEFAULT NULL COMMENT 'REDIRECT_URI认证返回地址',
+  `AUTHORITIES` varchar(256) DEFAULT NULL COMMENT 'AUTHORITIES',
+  `ACCESS_TOKEN_VALIDITY` int unsigned DEFAULT NULL COMMENT 'accesstoken有效时间',
+  `REFRESH_TOKEN_VALIDITY` int unsigned DEFAULT NULL,
+  `ADDITIONAL_INFORMATION` varchar(4096) DEFAULT NULL,
+  `APPROVALPROMPT` varchar(45) DEFAULT 'force',
+  `AUTOAPPROVE` varchar(45) DEFAULT NULL COMMENT '自动通过',
+  `IDTOKENENCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `USERINFOSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `JWKSURI` varchar(400) DEFAULT NULL,
+  PRIMARY KEY (`CLIENT_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='oauth_client_details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_saml_v20_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_saml_v20_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_saml_v20_details` (
+  `ID` varchar(45) NOT NULL,
+  `CERTISSUER` varchar(200) DEFAULT NULL,
+  `CERTSUBJECT` varchar(200) DEFAULT NULL,
+  `CERTEXPIRATION` varchar(100) DEFAULT NULL,
+  `KEYSTORE` blob,
+  `SPACSURL` varchar(200) NOT NULL,
+  `ISSUER` varchar(300) DEFAULT NULL,
+  `ENTITYID` varchar(300) DEFAULT NULL,
+  `VALIDITYINTERVAL` int unsigned DEFAULT NULL,
+  `NAMEIDFORMAT` varchar(45) DEFAULT NULL,
+  `NAMEIDCONVERT` tinyint unsigned DEFAULT NULL,
+  `NAMEIDSUFFIX` varchar(150) DEFAULT NULL,
+  `AUDIENCE` varchar(300) DEFAULT NULL,
+  `ENCRYPTED` tinyint unsigned DEFAULT NULL,
+  `BINDING` varchar(45) DEFAULT NULL,
+  `SIGNATURE` varchar(45) DEFAULT NULL,
+  `DIGESTMETHOD` varchar(45) DEFAULT NULL,
+  `METAURL` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_token_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_token_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_token_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_member`
+--
+
+DROP TABLE IF EXISTS `mxk_group_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `GROUPID` varchar(100) NOT NULL COMMENT 'GROUPID',
+  `MEMBERID` varchar(100) NOT NULL COMMENT 'MEMBERID USERID OR GROUP ID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE  USER OR GROUP',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEU_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group member,USERS OR GROUPS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_privileges`
+--
+
+DROP TABLE IF EXISTS `mxk_group_privileges`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_privileges` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `GROUPID` varchar(45) NOT NULL COMMENT 'GROUPID',
+  `APPID` varchar(45) NOT NULL COMMENT 'APPID',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEA_REFERENCE_APPLICAT` (`APPID`),
+  KEY `FK_APPROLEA_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_groups`
+--
+
+DROP TABLE IF EXISTS `mxk_groups`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_groups` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'GROUP NAME',
+  `DYNAMIC` varchar(2) DEFAULT NULL COMMENT '动态用户组,0否 1是',
+  `FILTERS` text COMMENT '过滤条件SQL',
+  `ORGIDSLIST` text COMMENT '机构列表',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  `RESUMETIME` varchar(45) DEFAULT NULL COMMENT 'RESUMETIME',
+  `SUSPENDTIME` varchar(45) DEFAULT NULL COMMENT 'SUSPENDTIME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='groups';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_connector`
+--
+
+DROP TABLE IF EXISTS `mxk_history_connector`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_connector` (
+  `ID` varchar(45) NOT NULL,
+  `CONNAME` varchar(200) DEFAULT NULL,
+  `CONTYPE` varchar(45) DEFAULT NULL,
+  `SOURCEID` varchar(45) DEFAULT NULL,
+  `SOURCENAME` varchar(500) DEFAULT NULL,
+  `OBJECTID` varchar(45) DEFAULT NULL,
+  `OBJECTNAME` varchar(500) DEFAULT NULL,
+  `DESCRIPTION` varchar(1000) DEFAULT NULL,
+  `SYNCTIME` varchar(45) DEFAULT NULL,
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_event`
+--
+
+DROP TABLE IF EXISTS `mxk_history_event`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_event` (
+  `id` bigint NOT NULL AUTO_INCREMENT,
+  `eventname` varchar(45) DEFAULT NULL,
+  `datatype` varchar(45) DEFAULT NULL,
+  `datacount` int DEFAULT NULL,
+  `executedatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(200) NOT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `SOURCEIP` varchar(45) DEFAULT NULL COMMENT 'LOGIN SOURCEIP ',
+  `LOGINTYPE` varchar(45) DEFAULT NULL COMMENT 'LOGINTYPE',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `PROVIDER` varchar(45) DEFAULT NULL COMMENT 'PROVIDER',
+  `BROWSER` varchar(45) DEFAULT NULL COMMENT 'BROWSER',
+  `PLATFORM` varchar(45) DEFAULT NULL COMMENT 'PLATFORM',
+  `APPLICATION` varchar(45) DEFAULT NULL COMMENT 'APPLICATION',
+  `LOGINURL` varchar(450) DEFAULT NULL COMMENT 'LOGINURL',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `LOGOUTTIME` varchar(50) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'LOGOUTTIME',
+  `SESSIONSTATUS` int DEFAULT '1',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='history_login';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login_apps` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `APPID` varchar(45) NOT NULL COMMENT 'ACCESS APPID',
+  `APPNAME` varchar(45) DEFAULT NULL COMMENT 'APPNAME',
+  `USERID` varchar(45) DEFAULT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sign On apps Records';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_logs`
+--
+
+DROP TABLE IF EXISTS `mxk_history_logs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_logs` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SERVICENAME` varchar(100) DEFAULT NULL COMMENT 'SERVICENAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `OPERATETYPE` varchar(45) DEFAULT NULL COMMENT 'OPERATETYPE',
+  `CONTENT` text COMMENT 'CONTENT JSON TYPE',
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'CREATEDDATE',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `MESSAGETYPE` varchar(45) DEFAULT NULL COMMENT 'MESSAGETYPE',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `TID` varchar(45) DEFAULT NULL COMMENT 'TID',
+  `TNAME` varchar(45) DEFAULT NULL COMMENT 'TNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER OPERATE LOGS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_synchronizer`
+--
+
+DROP TABLE IF EXISTS `mxk_history_synchronizer`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_synchronizer` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SYNCID` varchar(45) NOT NULL COMMENT 'SYNCID',
+  `SYNCNAME` varchar(45) DEFAULT NULL COMMENT 'SYNCNAME',
+  `OBJECTID` varchar(45) DEFAULT NULL COMMENT 'OBJECTID',
+  `OBJECTNAME` varchar(45) DEFAULT NULL COMMENT 'OBJECTNAME',
+  `OBJECTTYPE` varchar(45) DEFAULT NULL COMMENT 'OBJECTTYPE',
+  `SYNCTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'SYNCTIME',
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='synchronizer logs';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_notices`
+--
+
+DROP TABLE IF EXISTS `mxk_notices`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_notices` (
+  `ID` varchar(50) NOT NULL,
+  `TITLE` varchar(400) DEFAULT NULL,
+  `CONTENT` text,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `description` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通知';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_organizations`
+--
+
+DROP TABLE IF EXISTS `mxk_organizations`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_organizations` (
+  `ID` varchar(45) NOT NULL,
+  `NAME` varchar(200) NOT NULL,
+  `FULLNAME` varchar(100) DEFAULT NULL,
+  `TYPE` varchar(45) DEFAULT NULL,
+  `LEVEL` int unsigned DEFAULT NULL,
+  `PARENTID` varchar(45) DEFAULT NULL,
+  `PARENTNAME` varchar(45) DEFAULT NULL,
+  `CODEPATH` varchar(500) DEFAULT NULL,
+  `NAMEPATH` varchar(400) DEFAULT NULL,
+  `DESCRIPTION` varchar(200) DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `ADDRESS` varchar(200) DEFAULT NULL,
+  `POSTALCODE` varchar(45) DEFAULT NULL,
+  `PHONE` varchar(200) DEFAULT NULL,
+  `FAX` varchar(200) DEFAULT NULL,
+  `SORTINDEX` int unsigned DEFAULT '0',
+  `DIVISION` varchar(45) DEFAULT NULL,
+  `COUNTRY` varchar(45) DEFAULT NULL,
+  `REGION` varchar(45) DEFAULT NULL,
+  `LOCALITY` varchar(45) DEFAULT NULL,
+  `STREET` varchar(45) DEFAULT NULL,
+  `HASCHILD` varchar(45) DEFAULT NULL,
+  `CONTACT` varchar(45) DEFAULT NULL,
+  `CODE` varchar(45) DEFAULT NULL,
+  `EMAIL` varchar(45) DEFAULT NULL,
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  `EXTID` varchar(45) DEFAULT NULL COMMENT '外部id',
+  `EXTPARENTID` varchar(45) DEFAULT NULL COMMENT '外部PARENTID',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_password_policy`
+--
+
+DROP TABLE IF EXISTS `mxk_password_policy`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_password_policy` (
+  `ID` varchar(45) NOT NULL,
+  `MINLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MINLENGTH',
+  `MAXLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MAXLENGTH',
+  `LOWERCASE` tinyint unsigned DEFAULT '0' COMMENT 'LOWERCASE',
+  `UPPERCASE` tinyint unsigned DEFAULT '0' COMMENT 'UPPERCASE',
+  `DIGITS` tinyint unsigned DEFAULT '0' COMMENT 'DIGITS',
+  `SPECIALCHAR` tinyint unsigned DEFAULT '0' COMMENT 'SPECIALCHAR',
+  `ATTEMPTS` tinyint unsigned DEFAULT '0' COMMENT 'ATTEMPTS LOGIN FOR LOCK',
+  `DURATION` tinyint unsigned DEFAULT '0' COMMENT 'DURATION ',
+  `EXPIRATION` tinyint unsigned DEFAULT '0' COMMENT 'PASSWORD EXPIRATION',
+  `USERNAME` tinyint unsigned DEFAULT '0' COMMENT 'USERNAME IN PASSWORD',
+  `HISTORY` tinyint DEFAULT '0' COMMENT 'SIMPLEPASSWORDS NOT USE FOR PASSWORD',
+  `DICTIONARY` tinyint DEFAULT NULL,
+  `ALPHABETICAL` tinyint DEFAULT NULL,
+  `NUMERICAL` tinyint DEFAULT NULL,
+  `QWERTY` tinyint DEFAULT NULL,
+  `OCCURANCES` tinyint DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='password policy';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_resources`
+--
+
+DROP TABLE IF EXISTS `mxk_resources`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_resources` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `RESOURCETYPE` varchar(50) DEFAULT NULL,
+  `RESOURCEURL` varchar(500) DEFAULT NULL,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `parentId` varchar(50) DEFAULT NULL,
+  `parentname` varchar(200) DEFAULT NULL,
+  `APPID` varchar(50) DEFAULT NULL,
+  `RESOURCEACTION` varchar(200) DEFAULT NULL,
+  `RESOURCEICON` varchar(100) DEFAULT NULL,
+  `RESOURCESTYLE` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_member`
+--
+
+DROP TABLE IF EXISTS `mxk_role_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `ROLEID` varchar(45) NOT NULL COMMENT 'ROLEID',
+  `MEMBERID` varchar(45) NOT NULL COMMENT 'USERID OR ROLEID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE USER OR ROLE',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='role members';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_permissions`
+--
+
+DROP TABLE IF EXISTS `mxk_role_permissions`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_permissions` (
+  `id` varchar(50) NOT NULL,
+  `appid` varchar(50) DEFAULT NULL,
+  `roleid` varchar(50) DEFAULT NULL,
+  `resourceid` varchar(50) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `status` int DEFAULT '1',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_roles`
+--
+
+DROP TABLE IF EXISTS `mxk_roles`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_roles` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'ROLE NAME',
+  `DYNAMIC` varchar(45) DEFAULT NULL,
+  `FILTERS` text,
+  `ORGIDSLIST` text,
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_socials_associate`
+--
+
+DROP TABLE IF EXISTS `mxk_socials_associate`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_socials_associate` (
+  `ID` varchar(45) NOT NULL,
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) NOT NULL,
+  `PROVIDER` varchar(45) NOT NULL COMMENT 'PROVIDER',
+  `SOCIALUSERINFO` text COMMENT 'SOCIALUSERINFO',
+  `SOCIALUSERID` varchar(100) NOT NULL COMMENT 'SOCIALUSERID',
+  `EXATTRIBUTE` text,
+  `ACCESSTOKEN` text,
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `UPDATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `TRANSMISSION` varchar(45) DEFAULT 'automatic',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='socialsignon USER BIND';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_synchronizers`
+--
+
+DROP TABLE IF EXISTS `mxk_synchronizers`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_synchronizers` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `service` varchar(45) DEFAULT NULL,
+  `sourcetype` varchar(45) DEFAULT NULL,
+  `scheduler` varchar(45) DEFAULT NULL,
+  `providerurl` varchar(400) DEFAULT NULL,
+  `driverclass` varchar(400) DEFAULT NULL,
+  `principal` varchar(200) DEFAULT NULL,
+  `credentials` varchar(200) DEFAULT NULL,
+  `RESUMETIME` varchar(45) DEFAULT NULL,
+  `SUSPENDTIME` varchar(45) DEFAULT NULL,
+  `filters` varchar(400) DEFAULT NULL,
+  `basedn` varchar(45) DEFAULT NULL,
+  `msaddomain` varchar(45) DEFAULT NULL,
+  `sslswitch` varchar(45) DEFAULT NULL,
+  `truststore` varchar(45) DEFAULT NULL,
+  `truststorepassword` varchar(45) DEFAULT NULL,
+  `SYNCSTARTTIME` int DEFAULT '0' COMMENT '同步时间范围(单位天)',
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='同步器';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERNAME` varchar(100) NOT NULL COMMENT '登录名',
+  `PASSWORD` varchar(200) NOT NULL COMMENT '密码',
+  `DECIPHERABLE` varchar(200) NOT NULL COMMENT 'DE密码',
+  `AUTHNTYPE` tinyint unsigned DEFAULT NULL COMMENT '认证类型',
+  `MOBILE` varchar(45) DEFAULT NULL COMMENT '手机号码',
+  `MOBILEVERIFIED` varchar(45) DEFAULT NULL COMMENT '手机号验证',
+  `EMAIL` varchar(45) DEFAULT NULL COMMENT '邮箱',
+  `EMAILVERIFIED` smallint unsigned DEFAULT NULL COMMENT '邮箱验证',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '显示名称',
+  `NICKNAME` varchar(45) DEFAULT NULL COMMENT '昵称',
+  `PICTURE` blob COMMENT '头像',
+  `TIMEZONE` varchar(45) DEFAULT NULL COMMENT '时区',
+  `LOCALE` varchar(45) DEFAULT NULL COMMENT '地址',
+  `PREFERREDLANGUAGE` varchar(45) DEFAULT NULL COMMENT '语言偏好',
+  `PASSWORDQUESTION` varchar(45) DEFAULT NULL COMMENT '密码问题',
+  `PASSWORDANSWER` varchar(45) DEFAULT NULL COMMENT '密码答案',
+  `APPLOGINAUTHNTYPE` tinyint unsigned DEFAULT '0' COMMENT '应用登录认证类型',
+  `APPLOGINPASSWORD` varchar(45) DEFAULT NULL COMMENT '应用登录密码',
+  `PROTECTEDAPPS` varchar(450) DEFAULT NULL COMMENT '应用登录密码保护应用',
+  `THEME` varchar(45) DEFAULT 'default' COMMENT '主题',
+  `GRIDLIST` tinyint unsigned DEFAULT '0' COMMENT '应用列表类型',
+  `LOGINCOUNT` int unsigned DEFAULT '0' COMMENT '登录次数统计',
+  `ONLINE` tinyint unsigned DEFAULT NULL COMMENT '在线状态',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '用户状态',
+  `ISLOCKED` tinyint unsigned DEFAULT NULL COMMENT '锁定状态',
+  `UNLOCKTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '解锁时间',
+  `LASTLOGINIP` varchar(45) DEFAULT NULL COMMENT '最近登录IP地址',
+  `LASTLOGINTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近登录时间',
+  `LASTLOGOFFTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近注销时间',
+  `BADPASSWORDTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码错误时间',
+  `BADPASSWORDCOUNT` smallint unsigned DEFAULT NULL COMMENT '密码错误次数',
+  `PASSWORDLASTSETTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码修改时间',
+  `PASSWORDSETTYPE` tinyint unsigned DEFAULT '0' COMMENT '密码重置类型',
+  `SHAREDSECRET` varchar(500) DEFAULT NULL COMMENT 'TIME-OPT密钥',
+  `SHAREDCOUNTER` varchar(45) DEFAULT '0' COMMENT 'COUNTER-OPT密钥',
+  `USERTYPE` varchar(45) DEFAULT NULL COMMENT '用户类型',
+  `USERSTATE` varchar(45) DEFAULT NULL,
+  `EMPLOYEENUMBER` varchar(45) DEFAULT NULL COMMENT '工号',
+  `WINDOWSACCOUNT` varchar(45) DEFAULT NULL COMMENT 'AD域账号',
+  `DIVISION` varchar(45) DEFAULT NULL COMMENT '分支',
+  `COSTCENTER` varchar(45) DEFAULT NULL COMMENT '成本中心',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `WORKOFFICENAME` varchar(500) DEFAULT NULL,
+  `GIVENNAME` varchar(45) DEFAULT NULL COMMENT '名',
+  `MIDDLENAME` varchar(45) DEFAULT NULL COMMENT '中间名',
+  `FAMILYNAME` varchar(45) DEFAULT NULL COMMENT '姓',
+  `HONORIFICPREFIX` varchar(45) DEFAULT NULL COMMENT '前缀',
+  `HONORIFICSUFFIX` varchar(45) DEFAULT NULL COMMENT '后缀',
+  `FORMATTEDNAME` varchar(400) DEFAULT NULL COMMENT '用户全名',
+  `IDTYPE` tinyint unsigned DEFAULT '0' COMMENT '证件类型',
+  `IDCARDNO` varchar(45) DEFAULT NULL COMMENT '证件号码',
+  `MARRIED` tinyint unsigned DEFAULT '0' COMMENT '婚姻状态',
+  `BIRTHDATE` varchar(45) DEFAULT NULL COMMENT '生日',
+  `NAMEZHSPELL` varchar(100) DEFAULT NULL COMMENT '名字中文拼音',
+  `NAMEZHSHORTSPELL` varchar(45) DEFAULT NULL COMMENT '名字中文拼音简称',
+  `GENDER` tinyint unsigned DEFAULT NULL COMMENT '性别',
+  `WEBSITE` varchar(50) DEFAULT NULL COMMENT '个人主页',
+  `WEIXINFOLLOW` tinyint unsigned DEFAULT NULL COMMENT '微信关注',
+  `DEFINEIM` varchar(45) DEFAULT NULL COMMENT 'IM账号',
+  `HOMEEMAIL` varchar(45) DEFAULT NULL COMMENT '家庭-邮件',
+  `HOMEPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '家庭-电话',
+  `HOMECOUNTRY` varchar(45) DEFAULT NULL COMMENT '家庭-省/市',
+  `HOMEREGION` varchar(45) DEFAULT NULL COMMENT '家庭-市',
+  `HOMELOCALITY` varchar(45) DEFAULT NULL COMMENT '家庭-区',
+  `HOMESTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '家庭-街道',
+  `HOMEADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '家庭-地址全称',
+  `HOMEPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '家庭-邮编',
+  `HOMEFAX` varchar(45) DEFAULT NULL COMMENT '家庭-传真',
+  `EXTRAATTRIBUTE` varchar(4000) DEFAULT NULL COMMENT '用户扩展属性',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `USERNAME_UNIQUE` (`USERNAME`) /*!80000 INVISIBLE */,
+  UNIQUE KEY `MOBILE_UNIQUE` (`MOBILE`),
+  UNIQUE KEY `EMAIL_UNIQUE` (`EMAIL`),
+  KEY `EMPLOYEENUMBER_UNIQUE` (`EMPLOYEENUMBER`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO DEFINE';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo_adjunct`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo_adjunct`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo_adjunct` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERID` varchar(45) NOT NULL COMMENT '用户编号',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `COSTCENTER` varchar(45) DEFAULT NULL,
+  `DIVISION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO Adjunct';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-09-09 14:05:36

File diff suppressed because it is too large
+ 33 - 0
docker/docker-mysql/sql/v2.9.0.ga/maxkey_v2.9.0.GA_data.sql


+ 3 - 0
docker/docker-mysql/sql/v3.0.0.ga/init_v3.0.0.ga.sql

@@ -0,0 +1,3 @@
+ source /docker-entrypoint-initdb.d/maxkey_v3.0.0.GA.sql   ;
+ source /docker-entrypoint-initdb.d/maxkey_v3.0.0.GA_data.sql   ;
+ 

+ 843 - 0
docker/docker-mysql/sql/v3.0.0.ga/maxkey_v3.0.0.GA.sql

@@ -0,0 +1,843 @@
+CREATE DATABASE  IF NOT EXISTS `maxkey` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
+USE `maxkey`;
+-- MySQL dump 10.13  Distrib 8.0.21, for Win64 (x86_64)
+--
+-- Host: 127.0.0.1    Database: maxkey
+-- ------------------------------------------------------
+-- Server version	8.0.21
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `mxk_accounts`
+--
+
+DROP TABLE IF EXISTS `mxk_accounts`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_accounts` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `USERID` varchar(45) DEFAULT NULL COMMENT '用户ID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT '用户名',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '用户显示名',
+  `APPID` varchar(45) DEFAULT NULL COMMENT '应用ID',
+  `APPNAME` varchar(100) DEFAULT NULL COMMENT '应用名称',
+  `RELATEDUSERNAME` varchar(200) DEFAULT NULL COMMENT '用户名',
+  `RELATEDPASSWORD` varchar(200) DEFAULT NULL COMMENT '密码',
+  `MODIFIEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户账号表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `NAME` varchar(300) NOT NULL COMMENT '应用名称',
+  `LOGINURL` varchar(300) CHARACTER SET cp850 COLLATE cp850_general_ci NOT NULL COMMENT '应用登录地址',
+  `CATEGORY` varchar(45) DEFAULT NULL COMMENT '应用类型',
+  `SECRET` varchar(400) DEFAULT NULL COMMENT '应用密钥',
+  `PROTOCOL` varchar(300) DEFAULT NULL COMMENT '单点登录协议',
+  `ICON` blob COMMENT '应用图标',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '状态',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `VENDOR` varchar(45) DEFAULT NULL COMMENT '供应商',
+  `VENDORURL` varchar(200) DEFAULT NULL COMMENT '供应商地址',
+  `CREDENTIAL` tinyint DEFAULT '0' COMMENT '单点登录凭证类型',
+  `SHAREDUSERNAME` varchar(100) DEFAULT NULL COMMENT '共享用户名',
+  `SHAREDPASSWORD` varchar(400) DEFAULT NULL COMMENT '共享密码',
+  `SYSTEMUSERATTR` varchar(45) DEFAULT NULL COMMENT '系统用户属性',
+  `ISEXTENDATTR` varchar(4) DEFAULT NULL COMMENT '是否支持应用扩展属性',
+  `EXTENDATTR` varchar(4000) DEFAULT NULL COMMENT '应用扩展属性',
+  `SORTINDEX` int unsigned DEFAULT '0' COMMENT '排序序号',
+  `ISSIGNATURE` tinyint DEFAULT '0' COMMENT '签名状态',
+  `VISIBLE` tinyint DEFAULT '0' COMMENT '可见标识',
+  `ISADAPTER` tinyint unsigned DEFAULT '0' COMMENT '是否支持适配器',
+  `ADAPTERID` varchar(45) DEFAULT NULL,
+  `ADAPTERNAME` varchar(100) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL COMMENT '适配器',
+  `PRINCIPAL` varchar(45) DEFAULT NULL COMMENT '接口API用户',
+  `CREDENTIALS` varchar(200) DEFAULT NULL COMMENT '接口API用户凭证',
+  `USERPROPERTYS` varchar(4000) DEFAULT NULL COMMENT '接口返回用户属性定义',
+  `INDUCER` varchar(50) DEFAULT 'IDP' COMMENT '引导方式',
+  `LOGOUTURL` varchar(300) DEFAULT NULL COMMENT '注销地址',
+  `LOGOUTTYPE` int DEFAULT NULL COMMENT '单点注销方式 0 NONE,1 BACK_CHANNEL,2 FRONT_CHANNEL',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_adapters`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_adapters`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_adapters` (
+  `ID` varchar(50) NOT NULL,
+  `NAME` varchar(100) DEFAULT NULL,
+  `PROTOCOL` varchar(300) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ADAPTER';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_cas_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_cas_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_cas_details` (
+  `ID` varchar(45) NOT NULL,
+  `SERVICE` varchar(400) NOT NULL,
+  `CALLBACKURL` varchar(400) NOT NULL,
+  `EXPIRES` int DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_form_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_form_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_form_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `USERNAMEMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN NAME',
+  `PASSWORDMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN PASSWORD',
+  `REDIRECTURI` varchar(400) DEFAULT NULL COMMENT 'REDIRECTURI',
+  `AUTHORIZEVIEW` varchar(100) DEFAULT NULL COMMENT 'AUTHORIZEVIEW FOR LOCAL VIEW DEAL',
+  `passwordalgorithm` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FormBase details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_jwt_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_jwt_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_jwt_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_oauth_client_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_oauth_client_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_oauth_client_details` (
+  `CLIENT_ID` varchar(45) NOT NULL COMMENT 'appkey',
+  `RESOURCE_IDS` varchar(256) DEFAULT NULL COMMENT '资源ids',
+  `CLIENT_SECRET` varchar(256) DEFAULT NULL COMMENT 'appsecret',
+  `SCOPE` varchar(256) DEFAULT NULL COMMENT 'SCOPE',
+  `AUTHORIZED_GRANT_TYPES` varchar(256) DEFAULT NULL COMMENT '授权类型',
+  `WEB_SERVER_REDIRECT_URI` varchar(256) DEFAULT NULL COMMENT 'REDIRECT_URI认证返回地址',
+  `AUTHORITIES` varchar(256) DEFAULT NULL COMMENT 'AUTHORITIES',
+  `ACCESS_TOKEN_VALIDITY` int unsigned DEFAULT NULL COMMENT 'accesstoken有效时间',
+  `REFRESH_TOKEN_VALIDITY` int unsigned DEFAULT NULL,
+  `ADDITIONAL_INFORMATION` varchar(4096) DEFAULT NULL,
+  `APPROVALPROMPT` varchar(45) DEFAULT 'force',
+  `AUTOAPPROVE` varchar(45) DEFAULT NULL COMMENT '自动通过',
+  `IDTOKENENCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `USERINFOSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `JWKSURI` varchar(400) DEFAULT NULL,
+  PRIMARY KEY (`CLIENT_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='oauth_client_details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_saml_v20_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_saml_v20_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_saml_v20_details` (
+  `ID` varchar(45) NOT NULL,
+  `CERTISSUER` varchar(200) DEFAULT NULL,
+  `CERTSUBJECT` varchar(200) DEFAULT NULL,
+  `CERTEXPIRATION` varchar(100) DEFAULT NULL,
+  `KEYSTORE` blob,
+  `SPACSURL` varchar(200) NOT NULL,
+  `ISSUER` varchar(300) DEFAULT NULL,
+  `ENTITYID` varchar(300) DEFAULT NULL,
+  `VALIDITYINTERVAL` int unsigned DEFAULT NULL,
+  `NAMEIDFORMAT` varchar(45) DEFAULT NULL,
+  `NAMEIDCONVERT` tinyint unsigned DEFAULT NULL,
+  `NAMEIDSUFFIX` varchar(150) DEFAULT NULL,
+  `AUDIENCE` varchar(300) DEFAULT NULL,
+  `ENCRYPTED` tinyint unsigned DEFAULT NULL,
+  `BINDING` varchar(45) DEFAULT NULL,
+  `SIGNATURE` varchar(45) DEFAULT NULL,
+  `DIGESTMETHOD` varchar(45) DEFAULT NULL,
+  `METAURL` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_token_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_token_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_token_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_member`
+--
+
+DROP TABLE IF EXISTS `mxk_group_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `GROUPID` varchar(100) NOT NULL COMMENT 'GROUPID',
+  `MEMBERID` varchar(100) NOT NULL COMMENT 'MEMBERID USERID OR GROUP ID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE  USER OR GROUP',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEU_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group member,USERS OR GROUPS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_privileges`
+--
+
+DROP TABLE IF EXISTS `mxk_group_privileges`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_privileges` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `GROUPID` varchar(45) NOT NULL COMMENT 'GROUPID',
+  `APPID` varchar(45) NOT NULL COMMENT 'APPID',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEA_REFERENCE_APPLICAT` (`APPID`),
+  KEY `FK_APPROLEA_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_groups`
+--
+
+DROP TABLE IF EXISTS `mxk_groups`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_groups` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'GROUP NAME',
+  `DYNAMIC` varchar(2) DEFAULT NULL COMMENT '动态用户组,0否 1是',
+  `FILTERS` text COMMENT '过滤条件SQL',
+  `ORGIDSLIST` text COMMENT '机构列表',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  `RESUMETIME` varchar(45) DEFAULT NULL COMMENT 'RESUMETIME',
+  `SUSPENDTIME` varchar(45) DEFAULT NULL COMMENT 'SUSPENDTIME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='groups';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_connector`
+--
+
+DROP TABLE IF EXISTS `mxk_history_connector`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_connector` (
+  `ID` varchar(45) NOT NULL,
+  `CONNAME` varchar(200) DEFAULT NULL,
+  `CONTYPE` varchar(45) DEFAULT NULL,
+  `SOURCEID` varchar(45) DEFAULT NULL,
+  `SOURCENAME` varchar(500) DEFAULT NULL,
+  `OBJECTID` varchar(45) DEFAULT NULL,
+  `OBJECTNAME` varchar(500) DEFAULT NULL,
+  `DESCRIPTION` varchar(1000) DEFAULT NULL,
+  `SYNCTIME` varchar(45) DEFAULT NULL,
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_event`
+--
+
+DROP TABLE IF EXISTS `mxk_history_event`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_event` (
+  `id` bigint NOT NULL AUTO_INCREMENT,
+  `eventname` varchar(45) DEFAULT NULL,
+  `datatype` varchar(45) DEFAULT NULL,
+  `datacount` int DEFAULT NULL,
+  `executedatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(200) NOT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `SOURCEIP` varchar(45) DEFAULT NULL COMMENT 'LOGIN SOURCEIP ',
+  `LOGINTYPE` varchar(45) DEFAULT NULL COMMENT 'LOGINTYPE',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `PROVIDER` varchar(45) DEFAULT NULL COMMENT 'PROVIDER',
+  `BROWSER` varchar(45) DEFAULT NULL COMMENT 'BROWSER',
+  `PLATFORM` varchar(45) DEFAULT NULL COMMENT 'PLATFORM',
+  `APPLICATION` varchar(45) DEFAULT NULL COMMENT 'APPLICATION',
+  `LOGINURL` varchar(450) DEFAULT NULL COMMENT 'LOGINURL',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `LOGOUTTIME` varchar(50) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'LOGOUTTIME',
+  `SESSIONSTATUS` int DEFAULT '1',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='history_login';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login_apps` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `APPID` varchar(45) NOT NULL COMMENT 'ACCESS APPID',
+  `APPNAME` varchar(45) DEFAULT NULL COMMENT 'APPNAME',
+  `USERID` varchar(45) DEFAULT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sign On apps Records';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_logs`
+--
+
+DROP TABLE IF EXISTS `mxk_history_logs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_logs` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SERVICENAME` varchar(100) DEFAULT NULL COMMENT 'SERVICENAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `OPERATETYPE` varchar(45) DEFAULT NULL COMMENT 'OPERATETYPE',
+  `CONTENT` text COMMENT 'CONTENT JSON TYPE',
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'CREATEDDATE',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `MESSAGETYPE` varchar(45) DEFAULT NULL COMMENT 'MESSAGETYPE',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `TID` varchar(45) DEFAULT NULL COMMENT 'TID',
+  `TNAME` varchar(45) DEFAULT NULL COMMENT 'TNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER OPERATE LOGS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_synchronizer`
+--
+
+DROP TABLE IF EXISTS `mxk_history_synchronizer`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_synchronizer` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SYNCID` varchar(45) NOT NULL COMMENT 'SYNCID',
+  `SYNCNAME` varchar(45) DEFAULT NULL COMMENT 'SYNCNAME',
+  `OBJECTID` varchar(45) DEFAULT NULL COMMENT 'OBJECTID',
+  `OBJECTNAME` varchar(45) DEFAULT NULL COMMENT 'OBJECTNAME',
+  `OBJECTTYPE` varchar(45) DEFAULT NULL COMMENT 'OBJECTTYPE',
+  `SYNCTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'SYNCTIME',
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='synchronizer logs';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_notices`
+--
+
+DROP TABLE IF EXISTS `mxk_notices`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_notices` (
+  `ID` varchar(50) NOT NULL,
+  `TITLE` varchar(400) DEFAULT NULL,
+  `CONTENT` text,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `description` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通知';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_organizations`
+--
+
+DROP TABLE IF EXISTS `mxk_organizations`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_organizations` (
+  `ID` varchar(45) NOT NULL,
+  `NAME` varchar(200) NOT NULL,
+  `FULLNAME` varchar(100) DEFAULT NULL,
+  `TYPE` varchar(45) DEFAULT NULL,
+  `LEVEL` int unsigned DEFAULT NULL,
+  `PARENTID` varchar(45) DEFAULT NULL,
+  `PARENTNAME` varchar(45) DEFAULT NULL,
+  `CODEPATH` varchar(500) DEFAULT NULL,
+  `NAMEPATH` varchar(400) DEFAULT NULL,
+  `DESCRIPTION` varchar(200) DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `ADDRESS` varchar(200) DEFAULT NULL,
+  `POSTALCODE` varchar(45) DEFAULT NULL,
+  `PHONE` varchar(200) DEFAULT NULL,
+  `FAX` varchar(200) DEFAULT NULL,
+  `SORTINDEX` int unsigned DEFAULT '0',
+  `DIVISION` varchar(45) DEFAULT NULL,
+  `COUNTRY` varchar(45) DEFAULT NULL,
+  `REGION` varchar(45) DEFAULT NULL,
+  `LOCALITY` varchar(45) DEFAULT NULL,
+  `STREET` varchar(45) DEFAULT NULL,
+  `HASCHILD` varchar(45) DEFAULT NULL,
+  `CONTACT` varchar(45) DEFAULT NULL,
+  `CODE` varchar(45) DEFAULT NULL,
+  `EMAIL` varchar(45) DEFAULT NULL,
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  `EXTID` varchar(45) DEFAULT NULL COMMENT '外部id',
+  `EXTPARENTID` varchar(45) DEFAULT NULL COMMENT '外部PARENTID',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_password_policy`
+--
+
+DROP TABLE IF EXISTS `mxk_password_policy`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_password_policy` (
+  `ID` varchar(45) NOT NULL,
+  `MINLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MINLENGTH',
+  `MAXLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MAXLENGTH',
+  `LOWERCASE` tinyint unsigned DEFAULT '0' COMMENT 'LOWERCASE',
+  `UPPERCASE` tinyint unsigned DEFAULT '0' COMMENT 'UPPERCASE',
+  `DIGITS` tinyint unsigned DEFAULT '0' COMMENT 'DIGITS',
+  `SPECIALCHAR` tinyint unsigned DEFAULT '0' COMMENT 'SPECIALCHAR',
+  `ATTEMPTS` tinyint unsigned DEFAULT '0' COMMENT 'ATTEMPTS LOGIN FOR LOCK',
+  `DURATION` tinyint unsigned DEFAULT '0' COMMENT 'DURATION ',
+  `EXPIRATION` tinyint unsigned DEFAULT '0' COMMENT 'PASSWORD EXPIRATION',
+  `USERNAME` tinyint unsigned DEFAULT '0' COMMENT 'USERNAME IN PASSWORD',
+  `HISTORY` tinyint DEFAULT '0' COMMENT 'SIMPLEPASSWORDS NOT USE FOR PASSWORD',
+  `DICTIONARY` tinyint DEFAULT NULL,
+  `ALPHABETICAL` tinyint DEFAULT NULL,
+  `NUMERICAL` tinyint DEFAULT NULL,
+  `QWERTY` tinyint DEFAULT NULL,
+  `OCCURANCES` tinyint DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='password policy';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_resources`
+--
+
+DROP TABLE IF EXISTS `mxk_resources`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_resources` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `RESOURCETYPE` varchar(50) DEFAULT NULL,
+  `RESOURCEURL` varchar(500) DEFAULT NULL,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `parentId` varchar(50) DEFAULT NULL,
+  `parentname` varchar(200) DEFAULT NULL,
+  `APPID` varchar(50) DEFAULT NULL,
+  `RESOURCEACTION` varchar(200) DEFAULT NULL,
+  `RESOURCEICON` varchar(100) DEFAULT NULL,
+  `RESOURCESTYLE` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_member`
+--
+
+DROP TABLE IF EXISTS `mxk_role_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `ROLEID` varchar(45) NOT NULL COMMENT 'ROLEID',
+  `MEMBERID` varchar(45) NOT NULL COMMENT 'USERID OR ROLEID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE USER OR ROLE',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='role members';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_permissions`
+--
+
+DROP TABLE IF EXISTS `mxk_role_permissions`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_permissions` (
+  `id` varchar(50) NOT NULL,
+  `appid` varchar(50) DEFAULT NULL,
+  `roleid` varchar(50) DEFAULT NULL,
+  `resourceid` varchar(50) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `status` int DEFAULT '1',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_roles`
+--
+
+DROP TABLE IF EXISTS `mxk_roles`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_roles` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'ROLE NAME',
+  `DYNAMIC` varchar(45) DEFAULT NULL,
+  `FILTERS` text,
+  `ORGIDSLIST` text,
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_socials_associate`
+--
+
+DROP TABLE IF EXISTS `mxk_socials_associate`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_socials_associate` (
+  `ID` varchar(45) NOT NULL,
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) NOT NULL,
+  `PROVIDER` varchar(45) NOT NULL COMMENT 'PROVIDER',
+  `SOCIALUSERINFO` text COMMENT 'SOCIALUSERINFO',
+  `SOCIALUSERID` varchar(100) NOT NULL COMMENT 'SOCIALUSERID',
+  `EXATTRIBUTE` text,
+  `ACCESSTOKEN` text,
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `UPDATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `TRANSMISSION` varchar(45) DEFAULT 'automatic',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='socialsignon USER BIND';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_synchronizers`
+--
+
+DROP TABLE IF EXISTS `mxk_synchronizers`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_synchronizers` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `service` varchar(45) DEFAULT NULL,
+  `sourcetype` varchar(45) DEFAULT NULL,
+  `scheduler` varchar(45) DEFAULT NULL,
+  `providerurl` varchar(400) DEFAULT NULL,
+  `driverclass` varchar(400) DEFAULT NULL,
+  `principal` varchar(200) DEFAULT NULL,
+  `credentials` varchar(200) DEFAULT NULL,
+  `RESUMETIME` varchar(45) DEFAULT NULL,
+  `SUSPENDTIME` varchar(45) DEFAULT NULL,
+  `filters` varchar(400) DEFAULT NULL,
+  `basedn` varchar(45) DEFAULT NULL,
+  `msaddomain` varchar(45) DEFAULT NULL,
+  `sslswitch` varchar(45) DEFAULT NULL,
+  `truststore` varchar(45) DEFAULT NULL,
+  `truststorepassword` varchar(45) DEFAULT NULL,
+  `SYNCSTARTTIME` int DEFAULT '0' COMMENT '同步时间范围(单位天)',
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='同步器';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERNAME` varchar(100) NOT NULL COMMENT '登录名',
+  `PASSWORD` varchar(200) NOT NULL COMMENT '密码',
+  `DECIPHERABLE` varchar(200) NOT NULL COMMENT 'DE密码',
+  `AUTHNTYPE` tinyint unsigned DEFAULT NULL COMMENT '认证类型',
+  `MOBILE` varchar(45) DEFAULT NULL COMMENT '手机号码',
+  `MOBILEVERIFIED` varchar(45) DEFAULT NULL COMMENT '手机号验证',
+  `EMAIL` varchar(45) DEFAULT NULL COMMENT '邮箱',
+  `EMAILVERIFIED` smallint unsigned DEFAULT NULL COMMENT '邮箱验证',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '显示名称',
+  `NICKNAME` varchar(45) DEFAULT NULL COMMENT '昵称',
+  `PICTURE` blob COMMENT '头像',
+  `TIMEZONE` varchar(45) DEFAULT NULL COMMENT '时区',
+  `LOCALE` varchar(45) DEFAULT NULL COMMENT '地址',
+  `PREFERREDLANGUAGE` varchar(45) DEFAULT NULL COMMENT '语言偏好',
+  `PASSWORDQUESTION` varchar(45) DEFAULT NULL COMMENT '密码问题',
+  `PASSWORDANSWER` varchar(45) DEFAULT NULL COMMENT '密码答案',
+  `APPLOGINAUTHNTYPE` tinyint unsigned DEFAULT '0' COMMENT '应用登录认证类型',
+  `APPLOGINPASSWORD` varchar(45) DEFAULT NULL COMMENT '应用登录密码',
+  `PROTECTEDAPPS` varchar(450) DEFAULT NULL COMMENT '应用登录密码保护应用',
+  `THEME` varchar(45) DEFAULT 'default' COMMENT '主题',
+  `GRIDLIST` tinyint unsigned DEFAULT '0' COMMENT '应用列表类型',
+  `LOGINCOUNT` int unsigned DEFAULT '0' COMMENT '登录次数统计',
+  `ONLINE` tinyint unsigned DEFAULT NULL COMMENT '在线状态',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '用户状态',
+  `ISLOCKED` tinyint unsigned DEFAULT NULL COMMENT '锁定状态',
+  `UNLOCKTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '解锁时间',
+  `LASTLOGINIP` varchar(45) DEFAULT NULL COMMENT '最近登录IP地址',
+  `LASTLOGINTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近登录时间',
+  `LASTLOGOFFTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近注销时间',
+  `BADPASSWORDTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码错误时间',
+  `BADPASSWORDCOUNT` smallint unsigned DEFAULT NULL COMMENT '密码错误次数',
+  `PASSWORDLASTSETTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码修改时间',
+  `PASSWORDSETTYPE` tinyint unsigned DEFAULT '0' COMMENT '密码重置类型',
+  `SHAREDSECRET` varchar(500) DEFAULT NULL COMMENT 'TIME-OPT密钥',
+  `SHAREDCOUNTER` varchar(45) DEFAULT '0' COMMENT 'COUNTER-OPT密钥',
+  `USERTYPE` varchar(45) DEFAULT NULL COMMENT '用户类型',
+  `USERSTATE` varchar(45) DEFAULT NULL,
+  `EMPLOYEENUMBER` varchar(45) DEFAULT NULL COMMENT '工号',
+  `WINDOWSACCOUNT` varchar(45) DEFAULT NULL COMMENT 'AD域账号',
+  `DIVISION` varchar(45) DEFAULT NULL COMMENT '分支',
+  `COSTCENTER` varchar(45) DEFAULT NULL COMMENT '成本中心',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `WORKOFFICENAME` varchar(500) DEFAULT NULL,
+  `GIVENNAME` varchar(45) DEFAULT NULL COMMENT '名',
+  `MIDDLENAME` varchar(45) DEFAULT NULL COMMENT '中间名',
+  `FAMILYNAME` varchar(45) DEFAULT NULL COMMENT '姓',
+  `HONORIFICPREFIX` varchar(45) DEFAULT NULL COMMENT '前缀',
+  `HONORIFICSUFFIX` varchar(45) DEFAULT NULL COMMENT '后缀',
+  `FORMATTEDNAME` varchar(400) DEFAULT NULL COMMENT '用户全名',
+  `IDTYPE` tinyint unsigned DEFAULT '0' COMMENT '证件类型',
+  `IDCARDNO` varchar(45) DEFAULT NULL COMMENT '证件号码',
+  `MARRIED` tinyint unsigned DEFAULT '0' COMMENT '婚姻状态',
+  `BIRTHDATE` varchar(45) DEFAULT NULL COMMENT '生日',
+  `NAMEZHSPELL` varchar(100) DEFAULT NULL COMMENT '名字中文拼音',
+  `NAMEZHSHORTSPELL` varchar(45) DEFAULT NULL COMMENT '名字中文拼音简称',
+  `GENDER` tinyint unsigned DEFAULT NULL COMMENT '性别',
+  `WEBSITE` varchar(50) DEFAULT NULL COMMENT '个人主页',
+  `WEIXINFOLLOW` tinyint unsigned DEFAULT NULL COMMENT '微信关注',
+  `DEFINEIM` varchar(45) DEFAULT NULL COMMENT 'IM账号',
+  `HOMEEMAIL` varchar(45) DEFAULT NULL COMMENT '家庭-邮件',
+  `HOMEPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '家庭-电话',
+  `HOMECOUNTRY` varchar(45) DEFAULT NULL COMMENT '家庭-省/市',
+  `HOMEREGION` varchar(45) DEFAULT NULL COMMENT '家庭-市',
+  `HOMELOCALITY` varchar(45) DEFAULT NULL COMMENT '家庭-区',
+  `HOMESTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '家庭-街道',
+  `HOMEADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '家庭-地址全称',
+  `HOMEPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '家庭-邮编',
+  `HOMEFAX` varchar(45) DEFAULT NULL COMMENT '家庭-传真',
+  `EXTRAATTRIBUTE` varchar(4000) DEFAULT NULL COMMENT '用户扩展属性',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `USERNAME_UNIQUE` (`USERNAME`) /*!80000 INVISIBLE */,
+  UNIQUE KEY `MOBILE_UNIQUE` (`MOBILE`),
+  UNIQUE KEY `EMAIL_UNIQUE` (`EMAIL`),
+  KEY `EMPLOYEENUMBER_UNIQUE` (`EMPLOYEENUMBER`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO DEFINE';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo_adjunct`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo_adjunct`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo_adjunct` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERID` varchar(45) NOT NULL COMMENT '用户编号',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `COSTCENTER` varchar(45) DEFAULT NULL,
+  `DIVISION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO Adjunct';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-09-26 10:55:56

File diff suppressed because it is too large
+ 33 - 0
docker/docker-mysql/sql/v3.0.0.ga/maxkey_v3.0.0.GA_data.sql


+ 7 - 0
docker/docker-mysql/sql/v3.1.0.ga/init.sql

@@ -0,0 +1,7 @@
+create database if not exists  `maxkey` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */ ;
+
+use maxkey ;
+
+source /docker-entrypoint-initdb.d/v3.1.0.ga/maxkey_v3.1.0.GA.sql   ;
+source /docker-entrypoint-initdb.d/v3.1.0.ga/maxkey_v3.1.0.GA_data.sql   ;
+ 

+ 924 - 0
docker/docker-mysql/sql/v3.1.0.ga/maxkey_v3.1.0.GA.sql

@@ -0,0 +1,924 @@
+-- MySQL dump 10.13  Distrib 8.0.21, for Win64 (x86_64)
+--
+-- Host: 127.0.0.1    Database: maxkey
+-- ------------------------------------------------------
+-- Server version	8.0.21
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `mxk_accounts`
+--
+
+DROP TABLE IF EXISTS `mxk_accounts`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_accounts` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `USERID` varchar(45) DEFAULT NULL COMMENT '用户ID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT '用户名',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '用户显示名',
+  `APPID` varchar(45) DEFAULT NULL COMMENT '应用ID',
+  `APPNAME` varchar(100) DEFAULT NULL COMMENT '应用名称',
+  `RELATEDUSERNAME` varchar(200) DEFAULT NULL COMMENT '用户名',
+  `RELATEDPASSWORD` varchar(200) DEFAULT NULL COMMENT '密码',
+  `CREATETYPE` varchar(45) DEFAULT 'automatic',
+  `STRATEGYID` varchar(45) DEFAULT NULL,
+  `STATUS` int DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` date DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `UNIQUE_USER_ACCOUNT` (`USERNAME`,`APPID`,`RELATEDUSERNAME`,`USERID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户账号表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_accounts_strategy`
+--
+
+DROP TABLE IF EXISTS `mxk_accounts_strategy`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_accounts_strategy` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'strategy NAME',
+  `APPID` varchar(45) NOT NULL COMMENT 'APPID',
+  `APPNAME` varchar(45) NOT NULL COMMENT 'APPNAME',
+  `MAPPING` varchar(45) NOT NULL COMMENT 'ACCOUNT MAPPING',
+  `FILTERS` text,
+  `ORGIDSLIST` text,
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='accounts_strategy';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `NAME` varchar(300) NOT NULL COMMENT '应用名称',
+  `LOGINURL` varchar(300) CHARACTER SET cp850 COLLATE cp850_general_ci NOT NULL COMMENT '应用登录地址',
+  `CATEGORY` varchar(45) DEFAULT NULL COMMENT '应用类型',
+  `SECRET` varchar(400) DEFAULT NULL COMMENT '应用密钥',
+  `PROTOCOL` varchar(300) DEFAULT NULL COMMENT '单点登录协议',
+  `ICON` blob COMMENT '应用图标',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '状态',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `VENDOR` varchar(45) DEFAULT NULL COMMENT '供应商',
+  `VENDORURL` varchar(200) DEFAULT NULL COMMENT '供应商地址',
+  `CREDENTIAL` tinyint DEFAULT '0' COMMENT '单点登录凭证类型',
+  `SHAREDUSERNAME` varchar(100) DEFAULT NULL COMMENT '共享用户名',
+  `SHAREDPASSWORD` varchar(400) DEFAULT NULL COMMENT '共享密码',
+  `SYSTEMUSERATTR` varchar(45) DEFAULT NULL COMMENT '系统用户属性',
+  `ISEXTENDATTR` varchar(4) DEFAULT NULL COMMENT '是否支持应用扩展属性',
+  `EXTENDATTR` varchar(4000) DEFAULT NULL COMMENT '应用扩展属性',
+  `SORTINDEX` int unsigned DEFAULT '0' COMMENT '排序序号',
+  `ISSIGNATURE` tinyint DEFAULT '0' COMMENT '签名状态',
+  `VISIBLE` tinyint DEFAULT '0' COMMENT '可见标识',
+  `ISADAPTER` tinyint unsigned DEFAULT '0' COMMENT '是否支持适配器',
+  `ADAPTERID` varchar(45) DEFAULT NULL,
+  `ADAPTERNAME` varchar(100) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL COMMENT '适配器',
+  `PRINCIPAL` varchar(45) DEFAULT NULL COMMENT '接口API用户',
+  `CREDENTIALS` varchar(200) DEFAULT NULL COMMENT '接口API用户凭证',
+  `USERPROPERTYS` varchar(4000) DEFAULT NULL COMMENT '接口返回用户属性定义',
+  `INDUCER` varchar(50) DEFAULT 'IDP' COMMENT '引导方式',
+  `LOGOUTURL` varchar(300) DEFAULT NULL COMMENT '注销地址',
+  `LOGOUTTYPE` int DEFAULT NULL COMMENT '单点注销方式 0 NONE,1 BACK_CHANNEL,2 FRONT_CHANNEL',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_adapters`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_adapters`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_adapters` (
+  `ID` varchar(50) NOT NULL,
+  `NAME` varchar(100) DEFAULT NULL,
+  `PROTOCOL` varchar(300) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ADAPTER';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_cas_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_cas_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_cas_details` (
+  `ID` varchar(45) NOT NULL,
+  `SERVICE` varchar(400) NOT NULL,
+  `CALLBACKURL` varchar(400) NOT NULL,
+  `EXPIRES` int DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_form_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_form_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_form_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `USERNAMEMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN NAME',
+  `PASSWORDMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN PASSWORD',
+  `REDIRECTURI` varchar(400) DEFAULT NULL COMMENT 'REDIRECTURI',
+  `AUTHORIZEVIEW` varchar(100) DEFAULT NULL COMMENT 'AUTHORIZEVIEW FOR LOCAL VIEW DEAL',
+  `passwordalgorithm` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FormBase details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_jwt_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_jwt_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_jwt_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_oauth_client_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_oauth_client_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_oauth_client_details` (
+  `CLIENT_ID` varchar(45) NOT NULL COMMENT 'appkey',
+  `RESOURCE_IDS` varchar(256) DEFAULT NULL COMMENT '资源ids',
+  `CLIENT_SECRET` varchar(256) DEFAULT NULL COMMENT 'appsecret',
+  `SCOPE` varchar(256) DEFAULT NULL COMMENT 'SCOPE',
+  `AUTHORIZED_GRANT_TYPES` varchar(256) DEFAULT NULL COMMENT '授权类型',
+  `WEB_SERVER_REDIRECT_URI` varchar(256) DEFAULT NULL COMMENT 'REDIRECT_URI认证返回地址',
+  `AUTHORITIES` varchar(256) DEFAULT NULL COMMENT 'AUTHORITIES',
+  `ACCESS_TOKEN_VALIDITY` int unsigned DEFAULT NULL COMMENT 'accesstoken有效时间',
+  `REFRESH_TOKEN_VALIDITY` int unsigned DEFAULT NULL,
+  `ADDITIONAL_INFORMATION` varchar(4096) DEFAULT NULL,
+  `APPROVALPROMPT` varchar(45) DEFAULT 'force',
+  `AUTOAPPROVE` varchar(45) DEFAULT NULL COMMENT '自动通过',
+  `IDTOKENENCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `USERINFOSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `JWKSURI` varchar(400) DEFAULT NULL,
+  `PKCE` varchar(45) DEFAULT NULL,
+  `PROTOCOL` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`CLIENT_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='oauth_client_details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_saml_v20_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_saml_v20_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_saml_v20_details` (
+  `ID` varchar(45) NOT NULL,
+  `CERTISSUER` varchar(200) DEFAULT NULL,
+  `CERTSUBJECT` varchar(200) DEFAULT NULL,
+  `CERTEXPIRATION` varchar(100) DEFAULT NULL,
+  `KEYSTORE` blob,
+  `SPACSURL` varchar(200) NOT NULL,
+  `ISSUER` varchar(300) DEFAULT NULL,
+  `ENTITYID` varchar(300) DEFAULT NULL,
+  `VALIDITYINTERVAL` int unsigned DEFAULT NULL,
+  `NAMEIDFORMAT` varchar(45) DEFAULT NULL,
+  `NAMEIDCONVERT` tinyint unsigned DEFAULT NULL,
+  `NAMEIDSUFFIX` varchar(150) DEFAULT NULL,
+  `AUDIENCE` varchar(300) DEFAULT NULL,
+  `ENCRYPTED` tinyint unsigned DEFAULT NULL,
+  `BINDING` varchar(45) DEFAULT NULL,
+  `SIGNATURE` varchar(45) DEFAULT NULL,
+  `DIGESTMETHOD` varchar(45) DEFAULT NULL,
+  `METAURL` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_token_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_token_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_token_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_member`
+--
+
+DROP TABLE IF EXISTS `mxk_group_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `GROUPID` varchar(100) NOT NULL COMMENT 'GROUPID',
+  `MEMBERID` varchar(100) NOT NULL COMMENT 'MEMBERID USERID OR GROUP ID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE  USER OR GROUP',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEU_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group member,USERS OR GROUPS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_privileges`
+--
+
+DROP TABLE IF EXISTS `mxk_group_privileges`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_privileges` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `GROUPID` varchar(45) NOT NULL COMMENT 'GROUPID',
+  `APPID` varchar(45) NOT NULL COMMENT 'APPID',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEA_REFERENCE_APPLICAT` (`APPID`),
+  KEY `FK_APPROLEA_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_groups`
+--
+
+DROP TABLE IF EXISTS `mxk_groups`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_groups` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'GROUP NAME',
+  `DYNAMIC` varchar(2) DEFAULT NULL COMMENT '动态用户组,0否 1是',
+  `FILTERS` text COMMENT '过滤条件SQL',
+  `ORGIDSLIST` text COMMENT '机构列表',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  `RESUMETIME` varchar(45) DEFAULT NULL COMMENT 'RESUMETIME',
+  `SUSPENDTIME` varchar(45) DEFAULT NULL COMMENT 'SUSPENDTIME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='groups';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_connector`
+--
+
+DROP TABLE IF EXISTS `mxk_history_connector`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_connector` (
+  `ID` varchar(45) NOT NULL,
+  `CONNAME` varchar(200) DEFAULT NULL,
+  `CONTYPE` varchar(45) DEFAULT NULL,
+  `SOURCEID` varchar(45) DEFAULT NULL,
+  `SOURCENAME` varchar(500) DEFAULT NULL,
+  `OBJECTID` varchar(45) DEFAULT NULL,
+  `OBJECTNAME` varchar(500) DEFAULT NULL,
+  `DESCRIPTION` varchar(1000) DEFAULT NULL,
+  `SYNCTIME` varchar(45) DEFAULT NULL,
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_event`
+--
+
+DROP TABLE IF EXISTS `mxk_history_event`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_event` (
+  `id` bigint NOT NULL AUTO_INCREMENT,
+  `eventname` varchar(45) DEFAULT NULL,
+  `datatype` varchar(45) DEFAULT NULL,
+  `datacount` int DEFAULT NULL,
+  `executedatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(200) NOT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `SOURCEIP` varchar(45) DEFAULT NULL COMMENT 'LOGIN SOURCEIP ',
+  `LOGINTYPE` varchar(45) DEFAULT NULL COMMENT 'LOGINTYPE',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `PROVIDER` varchar(45) DEFAULT NULL COMMENT 'PROVIDER',
+  `BROWSER` varchar(45) DEFAULT NULL COMMENT 'BROWSER',
+  `PLATFORM` varchar(45) DEFAULT NULL COMMENT 'PLATFORM',
+  `APPLICATION` varchar(45) DEFAULT NULL COMMENT 'APPLICATION',
+  `LOGINURL` varchar(450) DEFAULT NULL COMMENT 'LOGINURL',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `LOGOUTTIME` varchar(50) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'LOGOUTTIME',
+  `SESSIONSTATUS` int DEFAULT '1',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='history_login';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login_apps` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `APPID` varchar(45) NOT NULL COMMENT 'ACCESS APPID',
+  `APPNAME` varchar(45) DEFAULT NULL COMMENT 'APPNAME',
+  `USERID` varchar(45) DEFAULT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sign On apps Records';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_logs`
+--
+
+DROP TABLE IF EXISTS `mxk_history_logs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_logs` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SERVICENAME` varchar(100) DEFAULT NULL COMMENT 'SERVICENAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `OPERATETYPE` varchar(45) DEFAULT NULL COMMENT 'OPERATETYPE',
+  `CONTENT` text COMMENT 'CONTENT JSON TYPE',
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'CREATEDDATE',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `MESSAGETYPE` varchar(45) DEFAULT NULL COMMENT 'MESSAGETYPE',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `TID` varchar(45) DEFAULT NULL COMMENT 'TID',
+  `TNAME` varchar(45) DEFAULT NULL COMMENT 'TNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER OPERATE LOGS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_synchronizer`
+--
+
+DROP TABLE IF EXISTS `mxk_history_synchronizer`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_synchronizer` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SYNCID` varchar(45) NOT NULL COMMENT 'SYNCID',
+  `SYNCNAME` varchar(45) DEFAULT NULL COMMENT 'SYNCNAME',
+  `OBJECTID` varchar(45) DEFAULT NULL COMMENT 'OBJECTID',
+  `OBJECTNAME` varchar(45) DEFAULT NULL COMMENT 'OBJECTNAME',
+  `OBJECTTYPE` varchar(45) DEFAULT NULL COMMENT 'OBJECTTYPE',
+  `SYNCTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'SYNCTIME',
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='synchronizer logs';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_notices`
+--
+
+DROP TABLE IF EXISTS `mxk_notices`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_notices` (
+  `ID` varchar(50) NOT NULL,
+  `TITLE` varchar(400) DEFAULT NULL,
+  `CONTENT` text,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `description` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通知';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_organizations`
+--
+
+DROP TABLE IF EXISTS `mxk_organizations`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_organizations` (
+  `ID` varchar(45) NOT NULL,
+  `NAME` varchar(200) NOT NULL,
+  `FULLNAME` varchar(100) DEFAULT NULL,
+  `TYPE` varchar(45) DEFAULT NULL,
+  `LEVEL` int unsigned DEFAULT NULL,
+  `PARENTID` varchar(45) DEFAULT NULL,
+  `PARENTNAME` varchar(45) DEFAULT NULL,
+  `CODEPATH` varchar(500) DEFAULT NULL,
+  `NAMEPATH` varchar(400) DEFAULT NULL,
+  `DESCRIPTION` varchar(200) DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `ADDRESS` varchar(200) DEFAULT NULL,
+  `POSTALCODE` varchar(45) DEFAULT NULL,
+  `PHONE` varchar(200) DEFAULT NULL,
+  `FAX` varchar(200) DEFAULT NULL,
+  `SORTINDEX` int unsigned DEFAULT '0',
+  `DIVISION` varchar(45) DEFAULT NULL,
+  `COUNTRY` varchar(45) DEFAULT NULL,
+  `REGION` varchar(45) DEFAULT NULL,
+  `LOCALITY` varchar(45) DEFAULT NULL,
+  `STREET` varchar(45) DEFAULT NULL,
+  `HASCHILD` varchar(45) DEFAULT NULL,
+  `CONTACT` varchar(45) DEFAULT NULL,
+  `CODE` varchar(45) DEFAULT NULL,
+  `EMAIL` varchar(45) DEFAULT NULL,
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_organizations_cast`
+--
+
+DROP TABLE IF EXISTS `mxk_organizations_cast`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_organizations_cast` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `CODE` varchar(45) DEFAULT NULL COMMENT '机构编码',
+  `NAME` varchar(200) NOT NULL COMMENT '机构名称',
+  `FULLNAME` varchar(100) DEFAULT NULL,
+  `PARENTID` varchar(45) DEFAULT NULL COMMENT '父级ID',
+  `PARENTNAME` varchar(45) DEFAULT NULL COMMENT '父级名称',
+  `CODEPATH` varchar(500) DEFAULT NULL COMMENT 'CODE路径',
+  `NAMEPATH` varchar(400) DEFAULT NULL COMMENT '名称路径',
+  `SORTINDEX` int DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL,
+  `PROVIDER` varchar(45) DEFAULT NULL COMMENT '机构提供者',
+  `ORGID` varchar(45) DEFAULT NULL COMMENT 'MXK机构id',
+  `ORGPARENTID` varchar(45) DEFAULT NULL COMMENT 'MXK机构PARENTID',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构映射表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_password_policy`
+--
+
+DROP TABLE IF EXISTS `mxk_password_policy`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_password_policy` (
+  `ID` varchar(45) NOT NULL,
+  `MINLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MINLENGTH',
+  `MAXLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MAXLENGTH',
+  `LOWERCASE` tinyint unsigned DEFAULT '0' COMMENT 'LOWERCASE',
+  `UPPERCASE` tinyint unsigned DEFAULT '0' COMMENT 'UPPERCASE',
+  `DIGITS` tinyint unsigned DEFAULT '0' COMMENT 'DIGITS',
+  `SPECIALCHAR` tinyint unsigned DEFAULT '0' COMMENT 'SPECIALCHAR',
+  `ATTEMPTS` tinyint unsigned DEFAULT '0' COMMENT 'ATTEMPTS LOGIN FOR LOCK',
+  `DURATION` tinyint unsigned DEFAULT '0' COMMENT 'DURATION ',
+  `EXPIRATION` tinyint unsigned DEFAULT '0' COMMENT 'PASSWORD EXPIRATION',
+  `USERNAME` tinyint unsigned DEFAULT '0' COMMENT 'USERNAME IN PASSWORD',
+  `HISTORY` tinyint DEFAULT '0' COMMENT 'SIMPLEPASSWORDS NOT USE FOR PASSWORD',
+  `DICTIONARY` tinyint DEFAULT NULL,
+  `ALPHABETICAL` tinyint DEFAULT NULL,
+  `NUMERICAL` tinyint DEFAULT NULL,
+  `QWERTY` tinyint DEFAULT NULL,
+  `OCCURANCES` tinyint DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='password policy';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_resources`
+--
+
+DROP TABLE IF EXISTS `mxk_resources`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_resources` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `RESOURCETYPE` varchar(50) DEFAULT NULL,
+  `RESOURCEURL` varchar(500) DEFAULT NULL,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `parentId` varchar(50) DEFAULT NULL,
+  `parentname` varchar(200) DEFAULT NULL,
+  `APPID` varchar(50) DEFAULT NULL,
+  `RESOURCEACTION` varchar(200) DEFAULT NULL,
+  `RESOURCEICON` varchar(100) DEFAULT NULL,
+  `RESOURCESTYLE` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_member`
+--
+
+DROP TABLE IF EXISTS `mxk_role_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `ROLEID` varchar(45) NOT NULL COMMENT 'ROLEID',
+  `MEMBERID` varchar(45) NOT NULL COMMENT 'USERID OR ROLEID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE USER OR ROLE',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='role members';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_permissions`
+--
+
+DROP TABLE IF EXISTS `mxk_role_permissions`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_permissions` (
+  `id` varchar(50) NOT NULL,
+  `appid` varchar(50) DEFAULT NULL,
+  `roleid` varchar(50) DEFAULT NULL,
+  `resourceid` varchar(50) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `status` int DEFAULT '1',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_roles`
+--
+
+DROP TABLE IF EXISTS `mxk_roles`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_roles` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'ROLE NAME',
+  `DYNAMIC` varchar(45) DEFAULT NULL,
+  `FILTERS` text,
+  `ORGIDSLIST` text,
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_socials_associate`
+--
+
+DROP TABLE IF EXISTS `mxk_socials_associate`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_socials_associate` (
+  `ID` varchar(45) NOT NULL,
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) NOT NULL,
+  `PROVIDER` varchar(45) NOT NULL COMMENT 'PROVIDER',
+  `SOCIALUSERINFO` text COMMENT 'SOCIALUSERINFO',
+  `SOCIALUSERID` varchar(100) NOT NULL COMMENT 'SOCIALUSERID',
+  `EXATTRIBUTE` text,
+  `ACCESSTOKEN` text,
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `UPDATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `TRANSMISSION` varchar(45) DEFAULT 'automatic',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='socialsignon USER BIND';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_socials_provider`
+--
+
+DROP TABLE IF EXISTS `mxk_socials_provider`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_socials_provider` (
+  `ID` varchar(45) NOT NULL,
+  `provider` varchar(45) DEFAULT NULL,
+  `providername` varchar(45) DEFAULT NULL,
+  `icon` varchar(45) DEFAULT NULL,
+  `clientid` varchar(100) DEFAULT NULL,
+  `clientsecret` varchar(400) DEFAULT NULL,
+  `agentId` varchar(45) DEFAULT NULL,
+  `hidden` varchar(45) DEFAULT 'false',
+  `sortIndex` int DEFAULT '1',
+  `status` int DEFAULT '1',
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_synchronizers`
+--
+
+DROP TABLE IF EXISTS `mxk_synchronizers`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_synchronizers` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `service` varchar(45) DEFAULT NULL,
+  `sourcetype` varchar(45) DEFAULT NULL,
+  `scheduler` varchar(45) DEFAULT NULL,
+  `providerurl` varchar(400) DEFAULT NULL,
+  `driverclass` varchar(400) DEFAULT NULL,
+  `principal` varchar(200) DEFAULT NULL,
+  `credentials` varchar(200) DEFAULT NULL,
+  `RESUMETIME` varchar(45) DEFAULT NULL,
+  `SUSPENDTIME` varchar(45) DEFAULT NULL,
+  `filters` varchar(400) DEFAULT NULL,
+  `basedn` varchar(45) DEFAULT NULL,
+  `msaddomain` varchar(45) DEFAULT NULL,
+  `sslswitch` varchar(45) DEFAULT NULL,
+  `truststore` varchar(45) DEFAULT NULL,
+  `truststorepassword` varchar(45) DEFAULT NULL,
+  `SYNCSTARTTIME` int DEFAULT '0' COMMENT '同步时间范围(单位天)',
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='同步器';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERNAME` varchar(100) NOT NULL COMMENT '登录名',
+  `PASSWORD` varchar(200) NOT NULL COMMENT '密码',
+  `DECIPHERABLE` varchar(200) NOT NULL COMMENT 'DE密码',
+  `AUTHNTYPE` tinyint unsigned DEFAULT NULL COMMENT '认证类型',
+  `MOBILE` varchar(45) DEFAULT NULL COMMENT '手机号码',
+  `MOBILEVERIFIED` varchar(45) DEFAULT NULL COMMENT '手机号验证',
+  `EMAIL` varchar(45) DEFAULT NULL COMMENT '邮箱',
+  `EMAILVERIFIED` smallint unsigned DEFAULT NULL COMMENT '邮箱验证',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '显示名称',
+  `NICKNAME` varchar(45) DEFAULT NULL COMMENT '昵称',
+  `PICTURE` blob COMMENT '头像',
+  `TIMEZONE` varchar(45) DEFAULT NULL COMMENT '时区',
+  `LOCALE` varchar(45) DEFAULT NULL COMMENT '地址',
+  `PREFERREDLANGUAGE` varchar(45) DEFAULT NULL COMMENT '语言偏好',
+  `PASSWORDQUESTION` varchar(45) DEFAULT NULL COMMENT '密码问题',
+  `PASSWORDANSWER` varchar(45) DEFAULT NULL COMMENT '密码答案',
+  `APPLOGINAUTHNTYPE` tinyint unsigned DEFAULT '0' COMMENT '应用登录认证类型',
+  `APPLOGINPASSWORD` varchar(45) DEFAULT NULL COMMENT '应用登录密码',
+  `PROTECTEDAPPS` varchar(450) DEFAULT NULL COMMENT '应用登录密码保护应用',
+  `THEME` varchar(45) DEFAULT 'default' COMMENT '主题',
+  `GRIDLIST` tinyint unsigned DEFAULT '0' COMMENT '应用列表类型',
+  `LOGINCOUNT` int unsigned DEFAULT '0' COMMENT '登录次数统计',
+  `ONLINE` tinyint unsigned DEFAULT NULL COMMENT '在线状态',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '用户状态',
+  `ISLOCKED` tinyint unsigned DEFAULT NULL COMMENT '锁定状态',
+  `UNLOCKTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '解锁时间',
+  `LASTLOGINIP` varchar(45) DEFAULT NULL COMMENT '最近登录IP地址',
+  `LASTLOGINTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近登录时间',
+  `LASTLOGOFFTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近注销时间',
+  `BADPASSWORDTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码错误时间',
+  `BADPASSWORDCOUNT` smallint unsigned DEFAULT NULL COMMENT '密码错误次数',
+  `PASSWORDLASTSETTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码修改时间',
+  `PASSWORDSETTYPE` tinyint unsigned DEFAULT '0' COMMENT '密码重置类型',
+  `SHAREDSECRET` varchar(500) DEFAULT NULL COMMENT 'TIME-OPT密钥',
+  `SHAREDCOUNTER` varchar(45) DEFAULT '0' COMMENT 'COUNTER-OPT密钥',
+  `USERTYPE` varchar(45) DEFAULT NULL COMMENT '用户类型',
+  `USERSTATE` varchar(45) DEFAULT NULL,
+  `EMPLOYEENUMBER` varchar(45) DEFAULT NULL COMMENT '工号',
+  `WINDOWSACCOUNT` varchar(45) DEFAULT NULL COMMENT 'AD域账号',
+  `DIVISION` varchar(45) DEFAULT NULL COMMENT '分支',
+  `COSTCENTER` varchar(45) DEFAULT NULL COMMENT '成本中心',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `WORKOFFICENAME` varchar(500) DEFAULT NULL,
+  `GIVENNAME` varchar(45) DEFAULT NULL COMMENT '名',
+  `MIDDLENAME` varchar(45) DEFAULT NULL COMMENT '中间名',
+  `FAMILYNAME` varchar(45) DEFAULT NULL COMMENT '姓',
+  `HONORIFICPREFIX` varchar(45) DEFAULT NULL COMMENT '前缀',
+  `HONORIFICSUFFIX` varchar(45) DEFAULT NULL COMMENT '后缀',
+  `FORMATTEDNAME` varchar(400) DEFAULT NULL COMMENT '用户全名',
+  `IDTYPE` tinyint unsigned DEFAULT '0' COMMENT '证件类型',
+  `IDCARDNO` varchar(45) DEFAULT NULL COMMENT '证件号码',
+  `MARRIED` tinyint unsigned DEFAULT '0' COMMENT '婚姻状态',
+  `BIRTHDATE` varchar(45) DEFAULT NULL COMMENT '生日',
+  `NAMEZHSPELL` varchar(100) DEFAULT NULL COMMENT '名字中文拼音',
+  `NAMEZHSHORTSPELL` varchar(45) DEFAULT NULL COMMENT '名字中文拼音简称',
+  `GENDER` tinyint unsigned DEFAULT NULL COMMENT '性别',
+  `WEBSITE` varchar(50) DEFAULT NULL COMMENT '个人主页',
+  `WEIXINFOLLOW` tinyint unsigned DEFAULT NULL COMMENT '微信关注',
+  `DEFINEIM` varchar(45) DEFAULT NULL COMMENT 'IM账号',
+  `HOMEEMAIL` varchar(45) DEFAULT NULL COMMENT '家庭-邮件',
+  `HOMEPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '家庭-电话',
+  `HOMECOUNTRY` varchar(45) DEFAULT NULL COMMENT '家庭-省/市',
+  `HOMEREGION` varchar(45) DEFAULT NULL COMMENT '家庭-市',
+  `HOMELOCALITY` varchar(45) DEFAULT NULL COMMENT '家庭-区',
+  `HOMESTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '家庭-街道',
+  `HOMEADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '家庭-地址全称',
+  `HOMEPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '家庭-邮编',
+  `HOMEFAX` varchar(45) DEFAULT NULL COMMENT '家庭-传真',
+  `EXTRAATTRIBUTE` varchar(4000) DEFAULT NULL COMMENT '用户扩展属性',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `USERNAME_UNIQUE` (`USERNAME`) /*!80000 INVISIBLE */,
+  UNIQUE KEY `MOBILE_UNIQUE` (`MOBILE`),
+  UNIQUE KEY `EMAIL_UNIQUE` (`EMAIL`),
+  KEY `EMPLOYEENUMBER_UNIQUE` (`EMPLOYEENUMBER`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO DEFINE';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo_adjunct`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo_adjunct`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo_adjunct` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERID` varchar(45) NOT NULL COMMENT '用户编号',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `COSTCENTER` varchar(45) DEFAULT NULL,
+  `DIVISION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO Adjunct';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-11-02 19:49:15

File diff suppressed because it is too large
+ 23 - 0
docker/docker-mysql/sql/v3.1.0.ga/maxkey_v3.1.0.GA_data.sql


+ 926 - 0
docker/docker-mysql/sql/v3.1.1.ga/maxkey_v3.1.1.GA.sql

@@ -0,0 +1,926 @@
+-- MySQL dump 10.13  Distrib 8.0.27, for Win64 (x86_64)
+--
+-- Host: 127.0.0.1    Database: maxkey
+-- ------------------------------------------------------
+-- Server version	8.0.21
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `mxk_accounts`
+--
+
+DROP TABLE IF EXISTS `mxk_accounts`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_accounts` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `USERID` varchar(45) DEFAULT NULL COMMENT '用户ID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT '用户名',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '用户显示名',
+  `APPID` varchar(45) DEFAULT NULL COMMENT '应用ID',
+  `APPNAME` varchar(100) DEFAULT NULL COMMENT '应用名称',
+  `RELATEDUSERNAME` varchar(200) DEFAULT NULL COMMENT '用户名',
+  `RELATEDPASSWORD` varchar(200) DEFAULT NULL COMMENT '密码',
+  `CREATETYPE` varchar(45) DEFAULT 'automatic',
+  `STRATEGYID` varchar(45) DEFAULT NULL,
+  `STATUS` int DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` date DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `UNIQUE_USER_ACCOUNT` (`USERNAME`,`APPID`,`RELATEDUSERNAME`,`USERID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户账号表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_accounts_strategy`
+--
+
+DROP TABLE IF EXISTS `mxk_accounts_strategy`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_accounts_strategy` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'strategy NAME',
+  `APPID` varchar(45) NOT NULL COMMENT 'APPID',
+  `APPNAME` varchar(45) NOT NULL COMMENT 'APPNAME',
+  `MAPPING` varchar(45) NOT NULL COMMENT 'ACCOUNT MAPPING',
+  `FILTERS` text,
+  `ORGIDSLIST` text,
+  `SUFFIXES` varchar(200) DEFAULT NULL,
+  `CREATETYPE` varchar(100) DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `CREATEDDATE` datetime DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='accounts_strategy';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps` (
+  `ID` varchar(45) NOT NULL COMMENT '主键',
+  `NAME` varchar(300) NOT NULL COMMENT '应用名称',
+  `LOGINURL` varchar(300) CHARACTER SET cp850 COLLATE cp850_general_ci NOT NULL COMMENT '应用登录地址',
+  `CATEGORY` varchar(45) DEFAULT NULL COMMENT '应用类型',
+  `SECRET` varchar(400) DEFAULT NULL COMMENT '应用密钥',
+  `PROTOCOL` varchar(300) DEFAULT NULL COMMENT '单点登录协议',
+  `ICON` blob COMMENT '应用图标',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '状态',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `VENDOR` varchar(45) DEFAULT NULL COMMENT '供应商',
+  `VENDORURL` varchar(200) DEFAULT NULL COMMENT '供应商地址',
+  `CREDENTIAL` tinyint DEFAULT '0' COMMENT '单点登录凭证类型',
+  `SHAREDUSERNAME` varchar(100) DEFAULT NULL COMMENT '共享用户名',
+  `SHAREDPASSWORD` varchar(400) DEFAULT NULL COMMENT '共享密码',
+  `SYSTEMUSERATTR` varchar(45) DEFAULT NULL COMMENT '系统用户属性',
+  `ISEXTENDATTR` varchar(4) DEFAULT NULL COMMENT '是否支持应用扩展属性',
+  `EXTENDATTR` varchar(4000) DEFAULT NULL COMMENT '应用扩展属性',
+  `SORTINDEX` int unsigned DEFAULT '0' COMMENT '排序序号',
+  `ISSIGNATURE` tinyint DEFAULT '0' COMMENT '签名状态',
+  `VISIBLE` tinyint DEFAULT '0' COMMENT '可见标识',
+  `ISADAPTER` tinyint unsigned DEFAULT '0' COMMENT '是否支持适配器',
+  `ADAPTERID` varchar(45) DEFAULT NULL,
+  `ADAPTERNAME` varchar(100) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL COMMENT '适配器',
+  `PRINCIPAL` varchar(45) DEFAULT NULL COMMENT '接口API用户',
+  `CREDENTIALS` varchar(200) DEFAULT NULL COMMENT '接口API用户凭证',
+  `USERPROPERTYS` varchar(4000) DEFAULT NULL COMMENT '接口返回用户属性定义',
+  `INDUCER` varchar(50) DEFAULT 'IDP' COMMENT '引导方式',
+  `LOGOUTURL` varchar(300) DEFAULT NULL COMMENT '注销地址',
+  `LOGOUTTYPE` int DEFAULT NULL COMMENT '单点注销方式 0 NONE,1 BACK_CHANNEL,2 FRONT_CHANNEL',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_adapters`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_adapters`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_adapters` (
+  `ID` varchar(50) NOT NULL,
+  `NAME` varchar(100) DEFAULT NULL,
+  `PROTOCOL` varchar(300) DEFAULT NULL,
+  `ADAPTER` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ADAPTER';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_cas_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_cas_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_cas_details` (
+  `ID` varchar(45) NOT NULL,
+  `SERVICE` varchar(400) NOT NULL,
+  `CALLBACKURL` varchar(400) NOT NULL,
+  `EXPIRES` int DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_form_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_form_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_form_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `USERNAMEMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN NAME',
+  `PASSWORDMAPPING` varchar(45) DEFAULT NULL COMMENT 'FORM LOGIN PASSWORD',
+  `REDIRECTURI` varchar(400) DEFAULT NULL COMMENT 'REDIRECTURI',
+  `AUTHORIZEVIEW` varchar(100) DEFAULT NULL COMMENT 'AUTHORIZEVIEW FOR LOCAL VIEW DEAL',
+  `passwordalgorithm` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FormBase details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_jwt_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_jwt_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_jwt_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_oauth_client_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_oauth_client_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_oauth_client_details` (
+  `CLIENT_ID` varchar(45) NOT NULL COMMENT 'appkey',
+  `RESOURCE_IDS` varchar(256) DEFAULT NULL COMMENT '资源ids',
+  `CLIENT_SECRET` varchar(256) DEFAULT NULL COMMENT 'appsecret',
+  `SCOPE` varchar(256) DEFAULT NULL COMMENT 'SCOPE',
+  `AUTHORIZED_GRANT_TYPES` varchar(256) DEFAULT NULL COMMENT '授权类型',
+  `WEB_SERVER_REDIRECT_URI` varchar(256) DEFAULT NULL COMMENT 'REDIRECT_URI认证返回地址',
+  `AUTHORITIES` varchar(256) DEFAULT NULL COMMENT 'AUTHORITIES',
+  `ACCESS_TOKEN_VALIDITY` int unsigned DEFAULT NULL COMMENT 'accesstoken有效时间',
+  `REFRESH_TOKEN_VALIDITY` int unsigned DEFAULT NULL,
+  `ADDITIONAL_INFORMATION` varchar(4096) DEFAULT NULL,
+  `APPROVALPROMPT` varchar(45) DEFAULT 'force',
+  `AUTOAPPROVE` varchar(45) DEFAULT NULL COMMENT '自动通过',
+  `IDTOKENENCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `IDTOKENENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `USERINFOSIGNINGALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOCRYPTEDALGORITHM` varchar(45) DEFAULT NULL,
+  `USERINFOENCRYPTIONMETHOD` varchar(45) DEFAULT NULL,
+  `JWKSURI` varchar(400) DEFAULT NULL,
+  `PKCE` varchar(45) DEFAULT NULL,
+  `PROTOCOL` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`CLIENT_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='oauth_client_details';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_saml_v20_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_saml_v20_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_saml_v20_details` (
+  `ID` varchar(45) NOT NULL,
+  `CERTISSUER` varchar(200) DEFAULT NULL,
+  `CERTSUBJECT` varchar(200) DEFAULT NULL,
+  `CERTEXPIRATION` varchar(100) DEFAULT NULL,
+  `KEYSTORE` blob,
+  `SPACSURL` varchar(200) NOT NULL,
+  `ISSUER` varchar(300) DEFAULT NULL,
+  `ENTITYID` varchar(300) DEFAULT NULL,
+  `VALIDITYINTERVAL` int unsigned DEFAULT NULL,
+  `NAMEIDFORMAT` varchar(45) DEFAULT NULL,
+  `NAMEIDCONVERT` tinyint unsigned DEFAULT NULL,
+  `NAMEIDSUFFIX` varchar(150) DEFAULT NULL,
+  `AUDIENCE` varchar(300) DEFAULT NULL,
+  `ENCRYPTED` tinyint unsigned DEFAULT NULL,
+  `BINDING` varchar(45) DEFAULT NULL,
+  `SIGNATURE` varchar(45) DEFAULT NULL,
+  `DIGESTMETHOD` varchar(45) DEFAULT NULL,
+  `METAURL` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_apps_token_based_details`
+--
+
+DROP TABLE IF EXISTS `mxk_apps_token_based_details`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_apps_token_based_details` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `ALGORITHMKEY` varchar(400) NOT NULL COMMENT '秘钥',
+  `ALGORITHM` varchar(45) NOT NULL COMMENT '加密算法 /DES,DESede,Blowfish and AES',
+  `EXPIRES` int unsigned DEFAULT '0' COMMENT 'EXPIRES TIME',
+  `REDIRECTURI` varchar(400) NOT NULL COMMENT 'REDIRECTURI',
+  `COOKIENAME` varchar(45) DEFAULT NULL,
+  `tokenType` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_member`
+--
+
+DROP TABLE IF EXISTS `mxk_group_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `GROUPID` varchar(100) NOT NULL COMMENT 'GROUPID',
+  `MEMBERID` varchar(100) NOT NULL COMMENT 'MEMBERID USERID OR GROUP ID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE  USER OR GROUP',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEU_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group member,USERS OR GROUPS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_group_privileges`
+--
+
+DROP TABLE IF EXISTS `mxk_group_privileges`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_group_privileges` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `GROUPID` varchar(45) NOT NULL COMMENT 'GROUPID',
+  `APPID` varchar(45) NOT NULL COMMENT 'APPID',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`),
+  KEY `FK_APPROLEA_REFERENCE_APPLICAT` (`APPID`),
+  KEY `FK_APPROLEA_REFERENCE_APPROLES` (`GROUPID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='group privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_groups`
+--
+
+DROP TABLE IF EXISTS `mxk_groups`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_groups` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'GROUP NAME',
+  `DYNAMIC` varchar(2) DEFAULT NULL COMMENT '动态用户组,0否 1是',
+  `FILTERS` text COMMENT '过滤条件SQL',
+  `ORGIDSLIST` text COMMENT '机构列表',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` datetime DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  `RESUMETIME` varchar(45) DEFAULT NULL COMMENT 'RESUMETIME',
+  `SUSPENDTIME` varchar(45) DEFAULT NULL COMMENT 'SUSPENDTIME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='groups';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_connector`
+--
+
+DROP TABLE IF EXISTS `mxk_history_connector`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_connector` (
+  `ID` varchar(45) NOT NULL,
+  `CONNAME` varchar(200) DEFAULT NULL,
+  `CONTYPE` varchar(45) DEFAULT NULL,
+  `SOURCEID` varchar(45) DEFAULT NULL,
+  `SOURCENAME` varchar(500) DEFAULT NULL,
+  `OBJECTID` varchar(45) DEFAULT NULL,
+  `OBJECTNAME` varchar(500) DEFAULT NULL,
+  `DESCRIPTION` varchar(1000) DEFAULT NULL,
+  `SYNCTIME` varchar(45) DEFAULT NULL,
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_event`
+--
+
+DROP TABLE IF EXISTS `mxk_history_event`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_event` (
+  `id` bigint NOT NULL AUTO_INCREMENT,
+  `eventname` varchar(45) DEFAULT NULL,
+  `datatype` varchar(45) DEFAULT NULL,
+  `datacount` int DEFAULT NULL,
+  `executedatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(200) NOT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `SOURCEIP` varchar(45) DEFAULT NULL COMMENT 'LOGIN SOURCEIP ',
+  `LOGINTYPE` varchar(45) DEFAULT NULL COMMENT 'LOGINTYPE',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `PROVIDER` varchar(45) DEFAULT NULL COMMENT 'PROVIDER',
+  `BROWSER` varchar(45) DEFAULT NULL COMMENT 'BROWSER',
+  `PLATFORM` varchar(45) DEFAULT NULL COMMENT 'PLATFORM',
+  `APPLICATION` varchar(45) DEFAULT NULL COMMENT 'APPLICATION',
+  `LOGINURL` varchar(450) DEFAULT NULL COMMENT 'LOGINURL',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `LOGOUTTIME` varchar(50) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'LOGOUTTIME',
+  `SESSIONSTATUS` int DEFAULT '1',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='history_login';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_login_apps`
+--
+
+DROP TABLE IF EXISTS `mxk_history_login_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_login_apps` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SESSIONID` varchar(45) DEFAULT NULL COMMENT 'SESSIONID',
+  `LOGINTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'LOGINTIME',
+  `APPID` varchar(45) NOT NULL COMMENT 'ACCESS APPID',
+  `APPNAME` varchar(45) DEFAULT NULL COMMENT 'APPNAME',
+  `USERID` varchar(45) DEFAULT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT 'DISPLAYNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sign On apps Records';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_logs`
+--
+
+DROP TABLE IF EXISTS `mxk_history_logs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_logs` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SERVICENAME` varchar(100) DEFAULT NULL COMMENT 'SERVICENAME',
+  `MESSAGE` varchar(200) DEFAULT NULL COMMENT 'MESSAGE',
+  `OPERATETYPE` varchar(45) DEFAULT NULL COMMENT 'OPERATETYPE',
+  `CONTENT` text COMMENT 'CONTENT JSON TYPE',
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'CREATEDDATE',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `MESSAGETYPE` varchar(45) DEFAULT NULL COMMENT 'MESSAGETYPE',
+  `USERNAME` varchar(45) DEFAULT NULL COMMENT 'USERNAME',
+  `CODE` varchar(45) DEFAULT NULL COMMENT 'CODE',
+  `TID` varchar(45) DEFAULT NULL COMMENT 'TID',
+  `TNAME` varchar(45) DEFAULT NULL COMMENT 'TNAME',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER OPERATE LOGS';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_history_synchronizer`
+--
+
+DROP TABLE IF EXISTS `mxk_history_synchronizer`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_history_synchronizer` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `SYNCID` varchar(45) NOT NULL COMMENT 'SYNCID',
+  `SYNCNAME` varchar(45) DEFAULT NULL COMMENT 'SYNCNAME',
+  `OBJECTID` varchar(45) DEFAULT NULL COMMENT 'OBJECTID',
+  `OBJECTNAME` varchar(45) DEFAULT NULL COMMENT 'OBJECTNAME',
+  `OBJECTTYPE` varchar(45) DEFAULT NULL COMMENT 'OBJECTTYPE',
+  `SYNCTIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'SYNCTIME',
+  `RESULT` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='synchronizer logs';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_notices`
+--
+
+DROP TABLE IF EXISTS `mxk_notices`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_notices` (
+  `ID` varchar(50) NOT NULL,
+  `TITLE` varchar(400) DEFAULT NULL,
+  `CONTENT` text,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  `description` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通知';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_organizations`
+--
+
+DROP TABLE IF EXISTS `mxk_organizations`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_organizations` (
+  `ID` varchar(45) NOT NULL,
+  `NAME` varchar(200) NOT NULL,
+  `FULLNAME` varchar(100) DEFAULT NULL,
+  `TYPE` varchar(45) DEFAULT NULL,
+  `LEVEL` int unsigned DEFAULT NULL,
+  `PARENTID` varchar(45) DEFAULT NULL,
+  `PARENTNAME` varchar(45) DEFAULT NULL,
+  `CODEPATH` varchar(500) DEFAULT NULL,
+  `NAMEPATH` varchar(400) DEFAULT NULL,
+  `DESCRIPTION` varchar(200) DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` datetime DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` datetime DEFAULT NULL,
+  `ADDRESS` varchar(200) DEFAULT NULL,
+  `POSTALCODE` varchar(45) DEFAULT NULL,
+  `PHONE` varchar(200) DEFAULT NULL,
+  `FAX` varchar(200) DEFAULT NULL,
+  `SORTINDEX` int unsigned DEFAULT '0',
+  `DIVISION` varchar(45) DEFAULT NULL,
+  `COUNTRY` varchar(45) DEFAULT NULL,
+  `REGION` varchar(45) DEFAULT NULL,
+  `LOCALITY` varchar(45) DEFAULT NULL,
+  `STREET` varchar(45) DEFAULT NULL,
+  `HASCHILD` varchar(45) DEFAULT NULL,
+  `CONTACT` varchar(45) DEFAULT NULL,
+  `CODE` varchar(45) DEFAULT NULL,
+  `EMAIL` varchar(45) DEFAULT NULL,
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_organizations_cast`
+--
+
+DROP TABLE IF EXISTS `mxk_organizations_cast`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_organizations_cast` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `CODE` varchar(45) DEFAULT NULL COMMENT '机构编码',
+  `NAME` varchar(200) NOT NULL COMMENT '机构名称',
+  `FULLNAME` varchar(100) DEFAULT NULL,
+  `PARENTID` varchar(45) DEFAULT NULL COMMENT '父级ID',
+  `PARENTNAME` varchar(45) DEFAULT NULL COMMENT '父级名称',
+  `CODEPATH` varchar(500) DEFAULT NULL COMMENT 'CODE路径',
+  `NAMEPATH` varchar(400) DEFAULT NULL COMMENT '名称路径',
+  `SORTINDEX` int DEFAULT NULL,
+  `STATUS` tinyint unsigned DEFAULT NULL,
+  `PROVIDER` varchar(45) DEFAULT NULL COMMENT '机构提供者',
+  `ORGID` varchar(45) DEFAULT NULL COMMENT 'MXK机构id',
+  `ORGPARENTID` varchar(45) DEFAULT NULL COMMENT 'MXK机构PARENTID',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构映射表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_password_policy`
+--
+
+DROP TABLE IF EXISTS `mxk_password_policy`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_password_policy` (
+  `ID` varchar(45) NOT NULL,
+  `MINLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MINLENGTH',
+  `MAXLENGTH` tinyint unsigned DEFAULT '0' COMMENT 'MAXLENGTH',
+  `LOWERCASE` tinyint unsigned DEFAULT '0' COMMENT 'LOWERCASE',
+  `UPPERCASE` tinyint unsigned DEFAULT '0' COMMENT 'UPPERCASE',
+  `DIGITS` tinyint unsigned DEFAULT '0' COMMENT 'DIGITS',
+  `SPECIALCHAR` tinyint unsigned DEFAULT '0' COMMENT 'SPECIALCHAR',
+  `ATTEMPTS` tinyint unsigned DEFAULT '0' COMMENT 'ATTEMPTS LOGIN FOR LOCK',
+  `DURATION` tinyint unsigned DEFAULT '0' COMMENT 'DURATION ',
+  `EXPIRATION` tinyint unsigned DEFAULT '0' COMMENT 'PASSWORD EXPIRATION',
+  `USERNAME` tinyint unsigned DEFAULT '0' COMMENT 'USERNAME IN PASSWORD',
+  `HISTORY` tinyint DEFAULT '0' COMMENT 'SIMPLEPASSWORDS NOT USE FOR PASSWORD',
+  `DICTIONARY` tinyint DEFAULT NULL,
+  `ALPHABETICAL` tinyint DEFAULT NULL,
+  `NUMERICAL` tinyint DEFAULT NULL,
+  `QWERTY` tinyint DEFAULT NULL,
+  `OCCURANCES` tinyint DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='password policy';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_resources`
+--
+
+DROP TABLE IF EXISTS `mxk_resources`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_resources` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `RESOURCETYPE` varchar(50) DEFAULT NULL,
+  `RESOURCEURL` varchar(500) DEFAULT NULL,
+  `STATUS` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(500) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `parentId` varchar(50) DEFAULT NULL,
+  `parentname` varchar(200) DEFAULT NULL,
+  `APPID` varchar(50) DEFAULT NULL,
+  `RESOURCEACTION` varchar(200) DEFAULT NULL,
+  `RESOURCEICON` varchar(100) DEFAULT NULL,
+  `RESOURCESTYLE` varchar(500) DEFAULT NULL,
+  `SORTINDEX` int DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_member`
+--
+
+DROP TABLE IF EXISTS `mxk_role_member`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_member` (
+  `ID` varchar(100) NOT NULL DEFAULT '' COMMENT 'ID',
+  `ROLEID` varchar(45) NOT NULL COMMENT 'ROLEID',
+  `MEMBERID` varchar(45) NOT NULL COMMENT 'USERID OR ROLEID',
+  `TYPE` varchar(45) NOT NULL COMMENT 'TYPE USER OR ROLE',
+  `CREATEDDATE` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='role members';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_role_permissions`
+--
+
+DROP TABLE IF EXISTS `mxk_role_permissions`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_role_permissions` (
+  `id` varchar(50) NOT NULL,
+  `appid` varchar(50) DEFAULT NULL,
+  `roleid` varchar(50) DEFAULT NULL,
+  `resourceid` varchar(50) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+  `status` int DEFAULT '1',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_roles`
+--
+
+DROP TABLE IF EXISTS `mxk_roles`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_roles` (
+  `ID` varchar(45) NOT NULL COMMENT 'ID',
+  `NAME` varchar(100) DEFAULT NULL COMMENT 'ROLE NAME',
+  `DYNAMIC` varchar(45) DEFAULT NULL,
+  `FILTERS` text,
+  `ORGIDSLIST` text,
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT 'STATUS',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT 'CREATEDBY',
+  `ISDEFAULT` tinyint unsigned DEFAULT NULL COMMENT 'ISDEFAULT',
+  `CREATEDDATE` date DEFAULT NULL COMMENT 'CREATEDDATE',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT 'MODIFIEDBY',
+  `MODIFIEDDATE` date DEFAULT NULL COMMENT 'MODIFIEDDATE',
+  `DESCRIPTION` varchar(500) DEFAULT NULL COMMENT 'DESCRIPTION',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='roles';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_socials_associate`
+--
+
+DROP TABLE IF EXISTS `mxk_socials_associate`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_socials_associate` (
+  `ID` varchar(45) NOT NULL,
+  `USERID` varchar(45) NOT NULL COMMENT 'USERID',
+  `USERNAME` varchar(45) NOT NULL,
+  `PROVIDER` varchar(45) NOT NULL COMMENT 'PROVIDER',
+  `SOCIALUSERINFO` text COMMENT 'SOCIALUSERINFO',
+  `SOCIALUSERID` varchar(100) NOT NULL COMMENT 'SOCIALUSERID',
+  `EXATTRIBUTE` text,
+  `ACCESSTOKEN` text,
+  `CREATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `UPDATEDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `TRANSMISSION` varchar(45) DEFAULT 'automatic',
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='socialsignon USER BIND';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_socials_provider`
+--
+
+DROP TABLE IF EXISTS `mxk_socials_provider`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_socials_provider` (
+  `ID` varchar(45) NOT NULL,
+  `provider` varchar(45) DEFAULT NULL,
+  `providername` varchar(45) DEFAULT NULL,
+  `icon` varchar(45) DEFAULT NULL,
+  `clientid` varchar(100) DEFAULT NULL,
+  `clientsecret` varchar(400) DEFAULT NULL,
+  `agentId` varchar(45) DEFAULT NULL,
+  `hidden` varchar(45) DEFAULT 'false',
+  `sortIndex` int DEFAULT '1',
+  `status` int DEFAULT '1',
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_synchronizers`
+--
+
+DROP TABLE IF EXISTS `mxk_synchronizers`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_synchronizers` (
+  `id` varchar(50) NOT NULL,
+  `name` varchar(200) DEFAULT NULL,
+  `service` varchar(45) DEFAULT NULL,
+  `sourcetype` varchar(45) DEFAULT NULL,
+  `scheduler` varchar(45) DEFAULT NULL,
+  `providerurl` varchar(400) DEFAULT NULL,
+  `driverclass` varchar(400) DEFAULT NULL,
+  `principal` varchar(200) DEFAULT NULL,
+  `credentials` varchar(200) DEFAULT NULL,
+  `RESUMETIME` varchar(45) DEFAULT NULL,
+  `SUSPENDTIME` varchar(45) DEFAULT NULL,
+  `filters` varchar(400) DEFAULT NULL,
+  `basedn` varchar(45) DEFAULT NULL,
+  `msaddomain` varchar(45) DEFAULT NULL,
+  `sslswitch` varchar(45) DEFAULT NULL,
+  `truststore` varchar(45) DEFAULT NULL,
+  `truststorepassword` varchar(45) DEFAULT NULL,
+  `SYNCSTARTTIME` int DEFAULT '0' COMMENT '同步时间范围(单位天)',
+  `STATUS` varchar(45) DEFAULT NULL,
+  `CREATEDBY` varchar(45) DEFAULT NULL,
+  `CREATEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDDATE` varchar(45) DEFAULT NULL,
+  `MODIFIEDBY` varchar(45) DEFAULT NULL,
+  `DESCRIPTION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='同步器';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERNAME` varchar(100) NOT NULL COMMENT '登录名',
+  `PASSWORD` varchar(200) NOT NULL COMMENT '密码',
+  `DECIPHERABLE` varchar(200) NOT NULL COMMENT 'DE密码',
+  `AUTHNTYPE` tinyint unsigned DEFAULT NULL COMMENT '认证类型',
+  `MOBILE` varchar(45) DEFAULT NULL COMMENT '手机号码',
+  `MOBILEVERIFIED` varchar(45) DEFAULT NULL COMMENT '手机号验证',
+  `EMAIL` varchar(45) DEFAULT NULL COMMENT '邮箱',
+  `EMAILVERIFIED` smallint unsigned DEFAULT NULL COMMENT '邮箱验证',
+  `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '显示名称',
+  `NICKNAME` varchar(45) DEFAULT NULL COMMENT '昵称',
+  `PICTURE` blob COMMENT '头像',
+  `TIMEZONE` varchar(45) DEFAULT NULL COMMENT '时区',
+  `LOCALE` varchar(45) DEFAULT NULL COMMENT '地址',
+  `PREFERREDLANGUAGE` varchar(45) DEFAULT NULL COMMENT '语言偏好',
+  `PASSWORDQUESTION` varchar(45) DEFAULT NULL COMMENT '密码问题',
+  `PASSWORDANSWER` varchar(45) DEFAULT NULL COMMENT '密码答案',
+  `APPLOGINAUTHNTYPE` tinyint unsigned DEFAULT '0' COMMENT '应用登录认证类型',
+  `APPLOGINPASSWORD` varchar(45) DEFAULT NULL COMMENT '应用登录密码',
+  `PROTECTEDAPPS` varchar(450) DEFAULT NULL COMMENT '应用登录密码保护应用',
+  `THEME` varchar(45) DEFAULT 'default' COMMENT '主题',
+  `GRIDLIST` tinyint unsigned DEFAULT '0' COMMENT '应用列表类型',
+  `LOGINCOUNT` int unsigned DEFAULT '0' COMMENT '登录次数统计',
+  `ONLINE` tinyint unsigned DEFAULT NULL COMMENT '在线状态',
+  `STATUS` tinyint unsigned DEFAULT NULL COMMENT '用户状态',
+  `ISLOCKED` tinyint unsigned DEFAULT NULL COMMENT '锁定状态',
+  `UNLOCKTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '解锁时间',
+  `LASTLOGINIP` varchar(45) DEFAULT NULL COMMENT '最近登录IP地址',
+  `LASTLOGINTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近登录时间',
+  `LASTLOGOFFTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近注销时间',
+  `BADPASSWORDTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码错误时间',
+  `BADPASSWORDCOUNT` smallint unsigned DEFAULT NULL COMMENT '密码错误次数',
+  `PASSWORDLASTSETTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码修改时间',
+  `PASSWORDSETTYPE` tinyint unsigned DEFAULT '0' COMMENT '密码重置类型',
+  `SHAREDSECRET` varchar(500) DEFAULT NULL COMMENT 'TIME-OPT密钥',
+  `SHAREDCOUNTER` varchar(45) DEFAULT '0' COMMENT 'COUNTER-OPT密钥',
+  `USERTYPE` varchar(45) DEFAULT NULL COMMENT '用户类型',
+  `USERSTATE` varchar(45) DEFAULT NULL,
+  `EMPLOYEENUMBER` varchar(45) DEFAULT NULL COMMENT '工号',
+  `WINDOWSACCOUNT` varchar(45) DEFAULT NULL COMMENT 'AD域账号',
+  `DIVISION` varchar(45) DEFAULT NULL COMMENT '分支',
+  `COSTCENTER` varchar(45) DEFAULT NULL COMMENT '成本中心',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `WORKOFFICENAME` varchar(500) DEFAULT NULL,
+  `GIVENNAME` varchar(45) DEFAULT NULL COMMENT '名',
+  `MIDDLENAME` varchar(45) DEFAULT NULL COMMENT '中间名',
+  `FAMILYNAME` varchar(45) DEFAULT NULL COMMENT '姓',
+  `HONORIFICPREFIX` varchar(45) DEFAULT NULL COMMENT '前缀',
+  `HONORIFICSUFFIX` varchar(45) DEFAULT NULL COMMENT '后缀',
+  `FORMATTEDNAME` varchar(400) DEFAULT NULL COMMENT '用户全名',
+  `IDTYPE` tinyint unsigned DEFAULT '0' COMMENT '证件类型',
+  `IDCARDNO` varchar(45) DEFAULT NULL COMMENT '证件号码',
+  `MARRIED` tinyint unsigned DEFAULT '0' COMMENT '婚姻状态',
+  `BIRTHDATE` varchar(45) DEFAULT NULL COMMENT '生日',
+  `NAMEZHSPELL` varchar(100) DEFAULT NULL COMMENT '名字中文拼音',
+  `NAMEZHSHORTSPELL` varchar(45) DEFAULT NULL COMMENT '名字中文拼音简称',
+  `GENDER` tinyint unsigned DEFAULT NULL COMMENT '性别',
+  `WEBSITE` varchar(50) DEFAULT NULL COMMENT '个人主页',
+  `WEIXINFOLLOW` tinyint unsigned DEFAULT NULL COMMENT '微信关注',
+  `DEFINEIM` varchar(45) DEFAULT NULL COMMENT 'IM账号',
+  `HOMEEMAIL` varchar(45) DEFAULT NULL COMMENT '家庭-邮件',
+  `HOMEPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '家庭-电话',
+  `HOMECOUNTRY` varchar(45) DEFAULT NULL COMMENT '家庭-省/市',
+  `HOMEREGION` varchar(45) DEFAULT NULL COMMENT '家庭-市',
+  `HOMELOCALITY` varchar(45) DEFAULT NULL COMMENT '家庭-区',
+  `HOMESTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '家庭-街道',
+  `HOMEADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '家庭-地址全称',
+  `HOMEPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '家庭-邮编',
+  `HOMEFAX` varchar(45) DEFAULT NULL COMMENT '家庭-传真',
+  `EXTRAATTRIBUTE` varchar(4000) DEFAULT NULL COMMENT '用户扩展属性',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `LDAPDN` varchar(500) DEFAULT NULL,
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `USERNAME_UNIQUE` (`USERNAME`) /*!80000 INVISIBLE */,
+  UNIQUE KEY `MOBILE_UNIQUE` (`MOBILE`),
+  UNIQUE KEY `EMAIL_UNIQUE` (`EMAIL`),
+  KEY `EMPLOYEENUMBER_UNIQUE` (`EMPLOYEENUMBER`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO DEFINE';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `mxk_userinfo_adjunct`
+--
+
+DROP TABLE IF EXISTS `mxk_userinfo_adjunct`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `mxk_userinfo_adjunct` (
+  `ID` varchar(45) NOT NULL COMMENT '编号',
+  `USERID` varchar(45) NOT NULL COMMENT '用户编号',
+  `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
+  `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
+  `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
+  `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
+  `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
+  `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
+  `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
+  `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
+  `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
+  `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
+  `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
+  `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
+  `SORTORDER` tinyint unsigned DEFAULT '0' COMMENT '部门内排序',
+  `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
+  `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
+  `WORKCOUNTRY` varchar(45) DEFAULT NULL COMMENT '工作-国家',
+  `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
+  `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
+  `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
+  `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
+  `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
+  `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
+  `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
+  `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
+  `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
+  `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
+  `COSTCENTER` varchar(45) DEFAULT NULL,
+  `DIVISION` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='USER INFO Adjunct';
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-11-21 18:29:07

File diff suppressed because it is too large
+ 23 - 0
docker/docker-mysql/sql/v3.1.1.ga/maxkey_v3.1.1.GA_data.sql


+ 25 - 0
eclipsePluginApply.bat

@@ -0,0 +1,25 @@
+call setEnvVars.bat
+
+set START_TIME="%date:~0,10% %time:~0,2%:%time:~3,5%"
+echo start time %START_TIME%
+
+call %JAVA_HOME%/bin/java -version
+call %GRADLE_HOME%/bin/gradle -version
+
+echo start clean . . .
+
+call %GRADLE_HOME%/bin/gradle cleanEclipseWtp
+
+call %GRADLE_HOME%/bin/gradle cleanEclipse
+
+pause
+
+call %GRADLE_HOME%/bin/gradle eclipseWtp
+
+call %GRADLE_HOME%/bin/gradle eclipse
+
+set END_TIME="%date:~0,10% %time:~0,2%:%time:~3,5%"
+
+echo clean start at %START_TIME%  complete at %END_TIME%.
+
+pause

+ 162 - 0
gradle.properties

@@ -0,0 +1,162 @@
+#maxkey properties 
+group                           =xintiong
+version                         =3.1.1
+vendor                          =http://www.jsjty.com
+author                          =xintiong
+
+#docker jib image
+jibFromImage					=anapsix/alpine-java:8_server-jre_unlimited
+jibToImage						=200.200.19.125:5000/taihu_jh/taihu
+jibToAuthUsername				=admin
+jibToAuthPassword				=xtwenhongquan
+
+#maxkey used jars version
+#Apache
+commonsbeanutilsVersion         =1.9.3
+commonscodecVersion             =1.15
+commonscollectionsVersion       =3.2.2
+commonscollections4Version      =4.4
+commonscsvVersion               =1.7
+commonstextVersion              =1.9
+commonsdbcp2Version             =2.6.0
+commonsdbutilsVersion           =1.7
+commonsdigester3Version         =3.2
+commonsdigesterVersion          =2.1
+commonsioVersion                =2.8.0
+commonslangVersion              =2.6
+commonslang3Version             =3.11
+commonsloggingVersion           =1.2
+commonspool2Version             =2.6.2
+commonshttpclientVersion        =3.1
+commonsfileuploadVersion        =1.4
+commonsemailVersion             =1.5
+httpcomponentsVersion           =4.5.13
+httpcoreVersion                 =4.4.14
+httpasyncclientVersion          =4.1.4
+velocityVersion                 =1.7
+velocitydepVersion              =1.4
+freemarkerVersion               =2.3.31
+xmlbeansVersion                 =3.0.1
+commonscompressVersion          =1.20
+log4jVersion                    =2.14.1
+kafkaclientsVersion             =2.8.1
+poiVersion                      =4.1.2
+tomcatVersion                   =9.0.54
+tomcatembedloggingjuliVersion   =8.5.2
+#spring
+springVersion                   =5.3.13
+springBootVersion               =2.5.6
+springSecurityVersion           =5.5.3
+springDataVersion               =2.5.7
+springSessionVersion            =2.5.3
+springkafkaVersion              =2.7.8
+springretryVersion              =1.3.0
+springplugincoreVersion         =2.0.0.RELEASE
+springpluginmetadataVersion     =2.0.0.RELEASE
+springfoxVersion                =3.0.0
+springcloudVersion              =3.0.4
+springcloudalibabaVersion       =2021.1
+springcloudalibabaspringVersion =1.0.11
+springcloudalibabacsplVersion   =1.8.2
+alibabanacosclientVersion  		=2.0.3
+#google
+jibGradlePluginVersion          =3.1.4
+jhlabsfiltersVersion            =2.0.235-1
+kaptchaVersion                  =2.3.2
+gsonVersion                     =2.8.8
+guavaVersion                    =30.1.1-jre
+tinkVersion                     =1.4.0
+zxingcoreVersion                =3.4.1
+concurrentlinkedhashmaplruVersion =1.4.2
+#jboss
+jbossloggingVersion             =3.4.2.Final
+hibernateVersion                =6.2.0.Final
+#doc
+swaggerVersion                  =1.6.2
+swaggerV3Version                =2.1.10
+knife4jVersion                  =3.0.3
+#database
+postgresqlVersion               =42.2.20
+mysqlconnectorjavaVersion       =8.0.26
+druidVersion                    =1.2.8
+druidspringbootstarterVersion   =1.2.8
+jedisVersion                    =3.7.0
+ehcacheVersion                  =3.9.6
+caffeineVersion                 =2.9.2
+mybatisVersion                  =3.5.7
+mybatisspringVersion            =2.0.6
+#saml
+opensamlVersion                 =2.6.6
+openwsVersion                   =1.5.6
+xmltoolingVersion               =1.4.6
+javasupportVersion              =7.5.1
+#others
+thymeleafVersion                =3.0.12.RELEASE
+springbootadminVersion          =2.5.4
+nettyVersion                    =4.1.66.Final
+hazelcastVersion                =4.2.2
+jakartaannotationVersion        =2.0.0
+jakartavalidationapiVersion     =3.0.0
+attoparserVersion               =2.0.5.RELEASE
+unbescapeVersion                =1.1.6.RELEASE
+slf4jVersion                    =1.7.32
+jacksonVersion                  =2.12.5
+bouncycastleVersion             =1.69
+junitVersion                    =4.11
+mockitoallVersion               =1.10.19
+xmlunitVersion                  =1.6
+nimbusjosejwtVersion            =9.4.1
+jcipannotationsVersion          =1.0
+minidevjsonsmartVersion         =2.3
+minidevasmVersion               =1.0.2
+simplehttpVersion               =1.0.5
+JustAuthVersion                 =1.16.4
+javassistVersion                =3.23.0-GA
+esapiVersion                    =2.2.0.0
+javaxmailVersion                =1.6.2
+javaxpersistenceVersion         =2.2.1
+activationVersion               =1.1.1
+javaxannotationapiVersion       =1.3.2
+jtaVersion                      =1.1
+javaxtransactionapiVersion      =1.3
+validationapiVersion            =2.0.1.Final
+jsr173Version                   =1.0
+jaxbapiVersion                  =2.3.1
+jaxbcoreVersion                 =3.0.2
+jaxbimplVersion                 =3.0.2
+jaxbxjcVersion                  =3.0.2
+classmateVersion                =1.5.0
+fastjsonVersion                 =1.2.78
+reactivestreamsVersion          =1.0.3
+reactorcoreVersion              =3.4.9
+reactornettyVersion             =1.0.10
+reactorextraVersion             =3.4.4
+szxcvbnVersion                  =0.2
+quartzVersion                   =2.3.2
+jodatimeVersion                 =2.10.13
+snakeyamlVersion                =1.29
+nekohtmlVersion                 =1.9.22
+ognlVersion                     =3.2.14
+cglibVersion                    =3.3.0
+asmVersion                      =7.3.1
+aopallianceVersion              =1.0
+aspectjtoolsVersion             =1.9.4
+evictorVersion                  =1.0.0
+lettuceVersion                  =6.1.4.RELEASE
+pinyin4jVersion                 =2.5.1
+#xml
+jdomVersion                     =2.0.2
+dom4jVersion                    =1.6.1
+serializerVersion               =2.7.2
+xmlresolverVersion              =1.2
+xmlsecVersion                   =1.5.8
+xpp3Version                     =1.1.6
+xstreamVersion                  =1.4.10
+passayVersion                   =1.6.0
+micrometercoreVersion           =1.6.4
+LatencyUtilsVersion             =2.0.3
+stax2apiVersion                 =4.2.1
+mapstructVersion                =1.4.1.Final
+#sdk
+aliyunjavasdkcoreVersion        =4.5.1
+tencentcloudsdkjavaVersion      =3.1.33

BIN
gradle/wrapper/gradle-wrapper.jar


+ 5 - 0
gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists

+ 234 - 0
gradlew

@@ -0,0 +1,234 @@
+#!/bin/sh
+
+#
+# Copyright ? 2015-2021 the original authors.
+#
+# Licensed 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
+#
+#      https://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.
+#
+
+##############################################################################
+#
+#   Gradle start up script for POSIX generated by Gradle.
+#
+#   Important for running:
+#
+#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+#       noncompliant, but you have some other compliant shell such as ksh or
+#       bash, then to run this script, type that shell name before the whole
+#       command line, like:
+#
+#           ksh Gradle
+#
+#       Busybox and similar reduced shells will NOT work, because this script
+#       requires all of these POSIX shell features:
+#         * functions;
+#         * expansions ?$var?, ?${var}?, ?${var:-default}?, ?${var+SET}?,
+#           ?${var#prefix}?, ?${var%suffix}?, and ?$( cmd )?;
+#         * compound commands having a testable exit status, especially ?case?;
+#         * various built-in commands including ?command?, ?set?, and ?ulimit?.
+#
+#   Important for patching:
+#
+#   (2) This script targets any POSIX shell, so it avoids extensions provided
+#       by Bash, Ksh, etc; in particular arrays are avoided.
+#
+#       The "traditional" practice of packing multiple parameters into a
+#       space-separated string is a well documented source of bugs and security
+#       problems, so this is (mostly) avoided, by progressively accumulating
+#       options in "$@", and eventually passing that to Java.
+#
+#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+#       see the in-line comments for details.
+#
+#       There are tweaks for specific operating systems such as AIX, CygWin,
+#       Darwin, MinGW, and NonStop.
+#
+#   (3) This script is generated from the Groovy template
+#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       within the Gradle project.
+#
+#       You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
+    [ -h "$app_path" ]
+do
+    ls=$( ls -ld "$app_path" )
+    link=${ls#*' -> '}
+    case $link in             #(
+      /*)   app_path=$link ;; #(
+      *)    app_path=$APP_HOME$link ;;
+    esac
+done
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+
+APP_NAME="Gradle"
+APP_BASE_NAME=${0##*/}
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+    echo "$*"
+} >&2
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in                #(
+  CYGWIN* )         cygwin=true  ;; #(
+  Darwin* )         darwin=true  ;; #(
+  MSYS* | MINGW* )  msys=true    ;; #(
+  NONSTOP* )        nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD=$JAVA_HOME/jre/sh/java
+    else
+        JAVACMD=$JAVA_HOME/bin/java
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD=java
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+    case $MAX_FD in #(
+      max*)
+        MAX_FD=$( ulimit -H -n ) ||
+            warn "Could not query maximum file descriptor limit"
+    esac
+    case $MAX_FD in  #(
+      '' | soft) :;; #(
+      *)
+        ulimit -n "$MAX_FD" ||
+            warn "Could not set maximum file descriptor limit to $MAX_FD"
+    esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+#   * args from the command line
+#   * the main class name
+#   * -classpath
+#   * -D...appname settings
+#   * --module-path (only if needed)
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+    JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    for arg do
+        if
+            case $arg in                                #(
+              -*)   false ;;                            # don't mess with options #(
+              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
+                    [ -e "$t" ] ;;                      #(
+              *)    false ;;
+            esac
+        then
+            arg=$( cygpath --path --ignore --mixed "$arg" )
+        fi
+        # Roll the args list around exactly as many times as the number of
+        # args, so each arg winds up back in the position where it started, but
+        # possibly modified.
+        #
+        # NB: a `for` loop captures its iteration list before it begins, so
+        # changing the positional parameters here affects neither the number of
+        # iterations, nor the values presented in `arg`.
+        shift                   # remove old arg
+        set -- "$@" "$arg"      # push replacement arg
+    done
+fi
+
+# Collect all arguments for the java command;
+#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+#     shell script including quotes and variable substitutions, so put them in
+#     double quotes to make sure that they get re-expanded; and
+#   * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+        "-Dorg.gradle.appname=$APP_BASE_NAME" \
+        -classpath "$CLASSPATH" \
+        org.gradle.wrapper.GradleWrapperMain \
+        "$@"
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+#   set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+        xargs -n1 |
+        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+        tr '\n' ' '
+    )" '"$@"'
+
+exec "$JAVACMD" "$@"

+ 89 - 0
gradlew.bat

@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem      https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

BIN
images/logo.jpg


BIN
images/logo_maxkey.png


BIN
images/maxkey_index.png


BIN
images/maxkey_login.png


BIN
images/maxkey_mgt_apps.png


BIN
images/maxkey_mgt_rpt.png


BIN
images/maxkey_mgt_users.png


BIN
maxkey-authentications/.DS_Store


BIN
maxkey-authentications/maxkey-authentication-captcha/.DS_Store


+ 8 - 0
maxkey-authentications/maxkey-authentication-captcha/build.gradle

@@ -0,0 +1,8 @@
+
+description = "maxkey-authentication-captcha"
+
+
+dependencies {
+	//local jars
+	implementation fileTree(dir: '../maxkey-lib/', include: '*/*.jar')   
+}

BIN
maxkey-authentications/maxkey-authentication-captcha/src/.DS_Store


+ 94 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/java/com/google/code/kaptcha/impl/LightNoise.java

@@ -0,0 +1,94 @@
+package com.google.code.kaptcha.impl;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.CubicCurve2D;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.awt.image.BufferedImage;
+import java.security.SecureRandom;
+import java.util.Random;
+
+import com.google.code.kaptcha.NoiseProducer;
+import com.google.code.kaptcha.util.Configurable;
+
+/**
+ * The default implementation of {@link NoiseProducer}, adds a noise on an
+ * image.
+ */
+public class LightNoise extends Configurable implements NoiseProducer
+{
+	/**
+	 * Draws a noise on the image. The noise curve depends on the factor values.
+	 * Noise won't be visible if all factors have the value > 1.0f
+	 * 
+	 * @param image
+	 *            the image to add the noise to
+	 * @param factorOne
+	 * @param factorTwo
+	 * @param factorThree
+	 * @param factorFour
+	 */
+	public void makeNoise(BufferedImage image, float factorOne,
+			float factorTwo, float factorThree, float factorFour)
+	{
+		Color color = getConfig().getNoiseColor();
+
+		// image size
+		int width = image.getWidth();
+		int height = image.getHeight();
+
+		// the points where the line changes the stroke and direction
+		Point2D[] pts = null;
+		Random rand = new SecureRandom();
+
+		// the curve from where the points are taken
+		CubicCurve2D cc = new CubicCurve2D.Float(width * factorOne, height
+				* rand.nextFloat(), width * factorTwo, height
+				* rand.nextFloat(), width * factorThree, height
+				* rand.nextFloat(), width * factorFour, height
+				* rand.nextFloat());
+
+		// creates an iterator to define the boundary of the flattened curve
+		PathIterator pi = cc.getPathIterator(null, 2);
+		Point2D tmp[] = new Point2D[200];
+		int i = 0;
+
+		// while pi is iterating the curve, adds points to tmp array
+		while (!pi.isDone())
+		{
+			float[] coords = new float[6];
+			switch (pi.currentSegment(coords))
+			{
+				case PathIterator.SEG_MOVETO:
+				case PathIterator.SEG_LINETO:
+					tmp[i] = new Point2D.Float(coords[0], coords[1]);
+			}
+			i++;
+			pi.next();
+		}
+
+		pts = new Point2D[i];
+		System.arraycopy(tmp, 0, pts, 0, i);
+
+		Graphics2D graph = (Graphics2D) image.getGraphics();
+		graph.setRenderingHints(new RenderingHints(
+				RenderingHints.KEY_ANTIALIASING,
+				RenderingHints.VALUE_ANTIALIAS_ON));
+
+		graph.setColor(color);
+
+		// for the maximum 3 point change the stroke and direction
+		for (i = 0; i < pts.length - 1; i++)
+		{
+			if (i < 3)
+				graph.setStroke(new BasicStroke(0.7f * (2 - i)));
+			graph.drawLine((int) pts[i].getX(), (int) pts[i].getY(),
+					(int) pts[i + 1].getX(), (int) pts[i + 1].getY());
+		}
+
+		graph.dispose();
+	}
+}

+ 49 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/java/com/google/code/kaptcha/impl/Ripple.java

@@ -0,0 +1,49 @@
+package com.google.code.kaptcha.impl;
+
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+
+import com.google.code.kaptcha.GimpyEngine;
+import com.google.code.kaptcha.NoiseProducer;
+import com.google.code.kaptcha.util.Configurable;
+import com.jhlabs.image.RippleFilter;
+import com.jhlabs.image.TransformFilter;
+
+/**
+ * {@link WaterRipple} adds water ripple effect to an image.
+ */
+public class Ripple extends Configurable implements GimpyEngine
+{
+	/**
+	 * Applies distortion by adding water ripple effect.
+	 *
+	 * @param baseImage the base image
+	 * @return the distorted image
+	 */
+	public BufferedImage getDistortedImage(BufferedImage baseImage)
+	{
+		NoiseProducer noiseProducer = getConfig().getNoiseImpl();
+		BufferedImage distortedImage = new BufferedImage(baseImage.getWidth(),
+				baseImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
+
+		Graphics2D graphics = (Graphics2D) distortedImage.getGraphics();
+
+		RippleFilter rippleFilter = new RippleFilter();
+		rippleFilter.setWaveType(RippleFilter.SINE);
+		rippleFilter.setXAmplitude(2.6f);
+		rippleFilter.setYAmplitude(1.7f);
+		rippleFilter.setXWavelength(15);
+		rippleFilter.setYWavelength(5);
+		rippleFilter.setEdgeAction(TransformFilter.NEAREST_NEIGHBOUR);
+
+		BufferedImage effectImage = rippleFilter.filter(baseImage, null);
+		
+		graphics.drawImage(effectImage, 0, 0, null, null);
+
+		graphics.dispose();
+
+		noiseProducer.makeNoise(distortedImage, .1f, .1f, .25f, .25f);
+		noiseProducer.makeNoise(distortedImage, .1f, .25f, .5f, .9f);
+		return distortedImage;
+	}
+}

+ 128 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/java/com/google/code/kaptcha/text/impl/RandomColorWordRenderer.java

@@ -0,0 +1,128 @@
+package com.google.code.kaptcha.text.impl;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.image.BufferedImage;
+import java.security.SecureRandom;
+import java.util.HashMap;
+import java.util.Random;
+import com.google.code.kaptcha.text.WordRenderer;
+import com.google.code.kaptcha.util.ConfigHelper;
+import com.google.code.kaptcha.util.Configurable;
+
+/**
+ * The default implementation of {@link WordRenderer}, creates an image with a
+ * word rendered on it.
+ */
+public class RandomColorWordRenderer extends Configurable implements WordRenderer
+{
+	ConfigHelper configHelper = new ConfigHelper();
+	/**
+	 * Renders a word to an image.
+	 * 
+	 * @param word
+	 *            The word to be rendered.
+	 * @param width
+	 *            The width of the image to be created.
+	 * @param height
+	 *            The height of the image to be created.
+	 * @return The BufferedImage created from the word.
+	 */
+	public BufferedImage renderWord(String word, int width, int height)
+	{
+		int fontSize = getConfig().getTextProducerFontSize();
+		Font[] fonts = getConfig().getTextProducerFonts(fontSize);
+		Color color = getConfig().getTextProducerFontColor();
+		int charSpace = getConfig().getTextProducerCharSpace();
+		BufferedImage image = new BufferedImage(width, height,
+				BufferedImage.TYPE_INT_ARGB);
+		Graphics2D g2D = image.createGraphics();
+		g2D.setColor(color);
+
+		RenderingHints hints = new RenderingHints(
+				RenderingHints.KEY_ANTIALIASING,
+				RenderingHints.VALUE_ANTIALIAS_ON);
+		hints.add(new RenderingHints(RenderingHints.KEY_RENDERING,
+				RenderingHints.VALUE_RENDER_QUALITY));
+		g2D.setRenderingHints(hints);
+
+		FontRenderContext frc = g2D.getFontRenderContext();
+		Random random = new SecureRandom();
+
+		int startPosY = (height - fontSize) / 5 + fontSize;
+
+		char[] wordChars = word.toCharArray();
+		Font[] chosenFonts = new Font[wordChars.length];
+		int [] charWidths = new int[wordChars.length];
+		int widthNeeded = 0;
+		for (int i = 0; i < wordChars.length; i++)
+		{
+			
+			//chosenFonts[i] = new Font("Arial", Font.BOLD, fontSize);
+			//random
+			chosenFonts[i] = fonts[random.nextInt(fonts.length)];
+
+			char[] charToDraw = new char[]{
+				wordChars[i]
+			};
+			GlyphVector gv = chosenFonts[i].createGlyphVector(frc, charToDraw);
+			charWidths[i] = (int)gv.getVisualBounds().getWidth();
+			if (i > 0)
+			{
+				widthNeeded = widthNeeded + 2;
+			}
+			widthNeeded = widthNeeded + charWidths[i];
+		}
+		
+		HashMap<String,String> selectedColor =new HashMap<String,String>();
+		int startPosX = (width - widthNeeded) / 2;
+		
+		for (int i = 0; i < wordChars.length; i++)
+		{
+			String randomcolor="";
+			do {
+				randomcolor=COLOR_LIST[random.nextInt(COLOR_LIST.length)].replaceAll(" ", "");
+			}while(selectedColor.containsKey(randomcolor));
+			
+			selectedColor.put(randomcolor, randomcolor);
+			
+			color = configHelper.getColor(randomcolor, randomcolor, Color.LIGHT_GRAY);
+			g2D.setColor(color);
+			
+			g2D.setFont(chosenFonts[i]);
+			
+			char[] charToDraw = new char[] {
+				wordChars[i]
+			};
+			
+			//System.out.println(charToDraw[0] +" - "+chosenFonts[i]);
+			g2D.drawChars(charToDraw, 0, charToDraw.length, startPosX, startPosY);
+			startPosX = startPosX + (int) charWidths[i] + charSpace;
+		}
+		
+		return image;
+	}
+	
+	static String [] COLOR_LIST = {
+			//"255, 255, 255",//white
+			//"192, 192, 192",//silver
+			//"128, 128, 128",//gray
+			"0, 0, 0",//black
+			"255, 0, 0",//red
+			"128, 0, 0",//maroon
+			"255, 255, 0",//yellow
+			"128, 128, 0",//olive
+			"0, 255, 0",//lime
+			"0, 128, 0",//green
+			"0, 255, 255",//aqua
+			"0, 128, 128",//teal
+			"0, 0, 255",//blue
+			"0, 0, 128",//navy
+			"255, 0, 255",//fuchsia
+			"128, 0, 128"//purple
+	};
+}

+ 60 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/java/org/maxkey/autoconfigure/KaptchaAutoConfiguration.java

@@ -0,0 +1,60 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.autoconfigure;
+
+import com.google.code.kaptcha.Producer;
+import com.google.code.kaptcha.impl.DefaultKaptcha;
+import com.google.code.kaptcha.util.Config;
+import java.io.IOException;
+import java.util.Properties;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+
+@Configuration
+public class KaptchaAutoConfiguration  implements InitializingBean {
+    private static final  Logger _logger = LoggerFactory.getLogger(KaptchaAutoConfiguration.class);
+    
+    public static final String kaptchaPropertySource      = "/kaptcha.properties";
+    /**
+     * Captcha Producer  Config .
+     * @return Producer
+     * @throws IOException kaptcha.properties is null
+     */
+    @Bean (name = "captchaProducer")
+    public Producer captchaProducer() throws IOException {
+        Resource resource = new ClassPathResource(kaptchaPropertySource);
+        _logger.debug("Kaptcha config file " + resource.getURL());
+        DefaultKaptcha  kaptcha = new DefaultKaptcha();
+        Properties properties = new Properties();
+        properties.load(resource.getInputStream());
+        Config config = new Config(properties);
+        kaptcha.setConfig(config);
+        return kaptcha;
+    }
+
+    @Override
+    public void afterPropertiesSet() throws Exception {
+        
+    }
+}

+ 141 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/java/org/maxkey/web/contorller/ImageCaptchaEndpoint.java

@@ -0,0 +1,141 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.web.contorller;
+
+import com.google.code.kaptcha.Producer;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+
+/**
+ * ImageCaptchaEndpoint  Producer captcha.
+ * @author Crystal.Sea
+ *
+ */
+@Controller
+public class ImageCaptchaEndpoint {
+    private static final Logger _logger = LoggerFactory.getLogger(ImageCaptchaEndpoint.class);
+
+    public static final	String IMAGE_GIF 			= "image/gif";
+    
+    public static final	String KAPTCHA_SESSION_KEY 	= "kaptcha_session_key";
+    
+    @Autowired
+    private Producer captchaProducer;
+    
+    @Value("${maxkey.login.captcha.type}")
+    private String captchaType;
+    
+
+    /**
+     * captcha image Producer.
+     * 
+     * @param request HttpServletRequest
+     * @param response HttpServletResponse
+     */
+    @RequestMapping(value = "/captcha")
+    public void captchaHandleRequest(HttpServletRequest request, HttpServletResponse response) {
+        try {
+           
+            String kaptchaText = captchaProducer.createText();
+            if (captchaType.equalsIgnoreCase("Arithmetic")) {
+                Integer intParamA = Integer.valueOf(kaptchaText.substring(0, 1));
+                Integer intParamB = Integer.valueOf(kaptchaText.substring(1, 2));
+                Integer calculateValue = 0;
+                if ((intParamA > intParamB) && ((intParamA + intParamB) % 5 > 3)) {
+                    calculateValue = intParamA - intParamB;
+                    kaptchaText = intParamA + "-" + intParamB + "=?";
+                } else {
+                    calculateValue = intParamA + intParamB;
+                    kaptchaText = intParamA + "+" + intParamB + "=?";
+                }
+                _logger.trace("Sesssion id " + request.getSession().getId() 
+                        + " , Arithmetic calculate Value is " + calculateValue);
+                request.getSession().setAttribute(
+                        KAPTCHA_SESSION_KEY, calculateValue + "");
+            } else {
+                // store the text in the session
+                request.getSession().setAttribute(KAPTCHA_SESSION_KEY, kaptchaText);
+            }
+            _logger.trace("Sesssion id " + request.getSession().getId() 
+                                + " , Captcha Text is " + kaptchaText);
+           
+            // create the image with the text
+            BufferedImage bufferedImage = captchaProducer.createImage(kaptchaText);
+            producerImage(request,response,bufferedImage);
+        } catch (Exception e) {
+            _logger.error("captcha Producer Error " + e.getMessage());
+        }
+    }
+
+    /**
+     * producerImage.
+     * @param request HttpServletRequest
+     * @param response HttpServletResponse
+     * @param bufferedImage BufferedImage
+     * @throws IOException error
+     */
+    public static void producerImage(HttpServletRequest request, 
+                              HttpServletResponse response,
+                              BufferedImage bufferedImage) throws IOException {
+        // Set to expire far in the past.
+        response.setDateHeader("Expires", 0);
+        // Set standard HTTP/1.1 no-cache headers.
+        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
+        // Set IE extended HTTP/1.1 no-cache headers (use addHeader).
+        response.addHeader("Cache-Control", "post-check=0, pre-check=0");
+        // Set standard HTTP/1.0 no-cache header.
+        response.setHeader("Pragma", "no-cache");
+        // return a jpeg/gif
+        response.setContentType(IMAGE_GIF);
+        _logger.trace("create the image");
+        // create the image
+        if (bufferedImage != null) {
+            ServletOutputStream out = response.getOutputStream();
+            // write the data out
+            ImageIO.write(bufferedImage, "gif", out);
+            try {
+                out.flush();
+            } finally {
+                out.close();
+            }
+        }
+    }
+ 
+
+    public void setCaptchaType(String captchaType) {
+		this.captchaType = captchaType;
+	}
+
+	public void setCaptchaProducer(Producer captchaProducer) {
+        this.captchaProducer = captchaProducer;
+    }
+
+
+}

+ 9 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/resources/kaptcha.properties

@@ -0,0 +1,9 @@
+kaptcha.image.width=80
+kaptcha.image.height=25
+kaptcha.border=no
+kaptcha.obscurificator.impl=com.google.code.kaptcha.impl.ShadowGimpy
+kaptcha.textproducer.font.size=23
+kaptcha.textproducer.char.string=0123456789
+kaptcha.textproducer.char.length=4
+kaptcha.noise.impl=com.google.code.kaptcha.impl.NoNoise
+#kaptcha.noise.color=white

+ 13 - 0
maxkey-authentications/maxkey-authentication-captcha/src/main/resources/kaptcha_c.properties

@@ -0,0 +1,13 @@
+kaptcha.image.width=80
+kaptcha.image.height=25
+kaptcha.border=no
+#kaptcha.obscurificator.impl=com.google.code.kaptcha.impl.ShadowGimpy
+kaptcha.obscurificator.impl=com.google.code.kaptcha.impl.Ripple
+kaptcha.textproducer.font.size=23
+kaptcha.textproducer.char.string=0123456789
+kaptcha.textproducer.char.length=4
+kaptcha.textproducer.char.space=3
+#kaptcha.noise.impl=com.google.code.kaptcha.impl.DefaultNoise
+kaptcha.noise.impl=com.google.code.kaptcha.impl.LightNoise
+#kaptcha.noise.color=white
+kaptcha.word.impl=com.google.code.kaptcha.text.impl.RandomColorWordRenderer

BIN
maxkey-authentications/maxkey-authentication-core/.DS_Store


+ 14 - 0
maxkey-authentications/maxkey-authentication-core/build.gradle

@@ -0,0 +1,14 @@
+
+description = "maxkey-authentication-core"
+
+
+dependencies {
+	//local jars
+	implementation fileTree(dir: '../maxkey-lib/', include: '*/*.jar')
+	
+	implementation project(":maxkey-common")
+	implementation project(":maxkey-core")
+	implementation project(":maxkey-persistence")
+   	implementation project(":maxkey-authentications:maxkey-authentication-otp")
+   
+}

BIN
maxkey-authentications/maxkey-authentication-core/src/.DS_Store


+ 3 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/META-INF/MANIFEST.MF

@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

+ 364 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/AbstractAuthenticationProvider.java

@@ -0,0 +1,364 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.maxkey.authn.online.OnlineTicketServices;
+import org.maxkey.authn.realm.AbstractAuthenticationRealm;
+import org.maxkey.authn.support.rememberme.AbstractRemeberMeService;
+import org.maxkey.configuration.ApplicationConfig;
+import org.maxkey.constants.ConstantsLoginType;
+import org.maxkey.entity.UserInfo;
+import org.maxkey.password.onetimepwd.AbstractOtpAuthn;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+/**
+ * login Authentication abstract class.
+ * 
+ * @author Crystal.Sea
+ *
+ */
+public abstract class AbstractAuthenticationProvider {
+    private static final Logger _logger = 
+            LoggerFactory.getLogger(AbstractAuthenticationProvider.class);
+
+    public class AuthType{
+    	public final static String NORMAL 	= "normal";
+    	public final static String TFA 		= "tfa";
+    	public final static String MOBILE 	= "mobile";
+    }
+    protected ApplicationConfig applicationConfig;
+
+    protected AbstractAuthenticationRealm authenticationRealm;
+
+    protected AbstractOtpAuthn tfaOtpAuthn;
+    
+    protected AbstractOtpAuthn smsOtpAuthn;
+
+    protected AbstractRemeberMeService remeberMeService;
+    
+    protected OnlineTicketServices onlineTicketServices;
+    
+    public static  ArrayList<GrantedAuthority> grantedAdministratorsAuthoritys = new ArrayList<GrantedAuthority>();
+    
+    static {
+        grantedAdministratorsAuthoritys.add(new SimpleGrantedAuthority("ROLE_ADMINISTRATORS"));
+    }
+
+    protected abstract String getProviderName();
+
+    protected abstract Authentication doInternalAuthenticate(LoginCredential authentication);
+    
+    public    abstract Authentication authentication(LoginCredential loginCredential,boolean isTrusted);
+    
+    @SuppressWarnings("rawtypes")
+    public boolean supports(Class authentication) {
+        return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication));
+    }
+
+    /**
+     * authenticate .
+     * 
+     */
+    public Authentication authenticate(LoginCredential loginCredential) 
+            throws AuthenticationException {
+        _logger.debug("Trying to authenticate user '{}' via {}", 
+                loginCredential.getPrincipal(), getProviderName());
+        // 登录SESSION
+        _logger.debug("Login  Session {}.", WebContext.getSession().getId());
+        Authentication authentication = null;
+        try {
+            authentication = doInternalAuthenticate(loginCredential);
+        } catch (AuthenticationException e) {
+            _logger.error("Failed to authenticate user {} via {}: {}",
+                    new Object[] {  loginCredential.getPrincipal(),
+                                    getProviderName(),
+                                    e.getMessage() });
+            WebContext.setAttribute(
+                    WebConstants.LOGIN_ERROR_SESSION_MESSAGE, e.getMessage());
+        } catch (Exception e) {
+             e.printStackTrace();
+            _logger.error("Login error Unexpected exception in {} authentication:\n{}" ,
+                            getProviderName(), e.getMessage());
+        }
+        
+        if (authentication== null || !authentication.isAuthenticated()) {
+            return authentication;
+        }
+
+        // user authenticated
+        _logger.debug("'{}' authenticated successfully by {}.", 
+                authentication.getPrincipal(), getProviderName());
+        
+        changeSession(authentication);
+        
+        authenticationRealm.insertLoginHistory(
+                WebContext.getUserInfo(), ConstantsLoginType.LOCAL, "", "xe00000004", "success");
+        
+        return authentication;
+    }
+    
+    protected void changeSession(Authentication authentication) {
+        
+        HashMap<String,Object> sessionAttributeMap = new HashMap<String,Object>();
+        for(String attributeName : WebContext.sessionAttributeNameList) {
+            sessionAttributeMap.put(attributeName, WebContext.getAttribute(attributeName));
+            WebContext.removeAttribute(attributeName);
+        }
+        
+        //new Session        
+        WebContext.getSession().invalidate();
+        
+        for(String attributeName : WebContext.sessionAttributeNameList) {
+            WebContext.setAttribute(attributeName, sessionAttributeMap.get(attributeName));
+        }
+        
+        _logger.debug("Login Success Session {} Mapping to user Session {}.",
+                        WebContext.getSession().getId(),
+                        WebContext.getAttribute(WebConstants.CURRENT_USER_SESSION_ID));
+    }
+   
+
+    /**
+     * session validate.
+     * 
+     * @param sessionId String
+     */
+    protected void sessionValid(String sessionId) {
+        if (sessionId == null || !sessionId.equals(WebContext.getSession().getId())) {
+            _logger.debug("login session valid error.");
+            _logger.debug("login session sessionId " + sessionId);
+            _logger.debug("login getSession sessionId " + WebContext.getSession().getId());
+            
+            String message = WebContext.getI18nValue("login.error.session");
+            throw new BadCredentialsException(message);
+        }
+    }
+
+    /**
+     * session validate.
+     * 
+     * @param jwtToken String
+     */
+    protected void jwtTokenValid(String jwtToken) {
+        /*
+         * if(jwtToken!=null && ! jwtToken.equals("")){
+         * if(jwtLoginService.jwtTokenValidation(j_jwtToken)){ return; } }
+         */
+        String message = WebContext.getI18nValue("login.error.session");
+        _logger.debug("login session valid error.");
+        throw new BadCredentialsException(message);
+    }
+
+    protected void authTypeValid(String authType) {
+        _logger.debug("Login AuthN Type  " + authType);
+        if (authType != null && (
+                authType.equalsIgnoreCase(AuthType.NORMAL) 
+                || authType.equalsIgnoreCase(AuthType.TFA)
+                || authType.equalsIgnoreCase(AuthType.MOBILE)
+        		)
+            ) {
+            return;
+        }
+        
+        final   String message = WebContext.getI18nValue("login.error.authtype");
+        _logger.debug("Login AuthN type must eq basic or tfa , Error message is {}" , message);
+        throw new BadCredentialsException(message);
+    }
+
+    /**
+     * captcha validate .
+     * 
+     * @param authType String
+     * @param captcha String
+     */
+    protected void captchaValid(String captcha, String authType) {
+        // for basic
+        if (applicationConfig.getLoginConfig().isCaptcha() 
+        		&& authType.equalsIgnoreCase(AuthType.NORMAL)) {
+            _logger.info("captcha : "
+                    + WebContext.getSession().getAttribute(
+                            WebConstants.KAPTCHA_SESSION_KEY).toString());
+            if (captcha == null || !captcha
+                    .equals(WebContext.getSession().getAttribute(
+                                    WebConstants.KAPTCHA_SESSION_KEY).toString())) {
+                String message = WebContext.getI18nValue("login.error.captcha");
+                _logger.debug("login captcha valid error.");
+                throw new BadCredentialsException(message);
+            }
+        }
+    }
+
+    /**
+     * captcha validate.
+     * 
+     * @param otpCaptcha String
+     * @param authType   String
+     * @param userInfo   UserInfo
+     */
+    protected void tftcaptchaValid(String otpCaptcha, String authType, UserInfo userInfo) {
+        // for one time password 2 factor
+        if (applicationConfig.getLoginConfig().isMfa() 
+        		&& authType.equalsIgnoreCase(AuthType.TFA)) {
+            UserInfo validUserInfo = new UserInfo();
+            validUserInfo.setUsername(userInfo.getUsername());
+            validUserInfo.setSharedSecret(userInfo.getSharedSecret());
+            validUserInfo.setSharedCounter(userInfo.getSharedCounter());
+            validUserInfo.setId(userInfo.getId());
+            if (otpCaptcha == null || !tfaOtpAuthn.validate(validUserInfo, otpCaptcha)) {
+                String message = WebContext.getI18nValue("login.error.captcha");
+                _logger.debug("login captcha valid error.");
+                throw new BadCredentialsException(message);
+            }
+        }
+    }
+    
+    /**
+     * mobile validate.
+     * 
+     * @param otpCaptcha String
+     * @param authType   String
+     * @param userInfo   UserInfo
+     */
+    protected void mobilecaptchaValid(String password, String authType, UserInfo userInfo) {
+        // for mobile password
+        if (applicationConfig.getLoginConfig().isMfa() 
+        		&& authType.equalsIgnoreCase(AuthType.MOBILE)) {
+            UserInfo validUserInfo = new UserInfo();
+            validUserInfo.setUsername(userInfo.getUsername());
+            validUserInfo.setId(userInfo.getId());
+            if (password == null || !smsOtpAuthn.validate(validUserInfo, password)) {
+                String message = WebContext.getI18nValue("login.error.captcha");
+                _logger.debug("login captcha valid error.");
+                throw new BadCredentialsException(message);
+            }
+        }
+    }
+
+    /**
+     * login user by j_username and j_cname first query user by j_cname if first
+     * step userinfo is null,query user from system.
+     * 
+     * @param username String
+     * @param password String
+     * @return
+     */
+    public UserInfo loadUserInfo(String username, String password) {
+        UserInfo userInfo = authenticationRealm.loadUserInfo(username, password);
+
+        if (userInfo != null) {
+            if (userInfo.getUserType() == "SYSTEM") {
+                _logger.debug("SYSTEM User Login. ");
+            } else {
+                _logger.debug("User Login. ");
+            }
+            
+        }
+
+        return userInfo;
+    }
+
+    /**
+     * check input password empty.
+     * 
+     * @param password String
+     * @return
+     */
+    protected boolean emptyPasswordValid(String password) {
+        if (null == password || "".equals(password)) {
+            throw new BadCredentialsException(WebContext.getI18nValue("login.error.password.null"));
+        }
+        return true;
+    }
+
+    /**
+     * check input username or password empty.
+     * 
+     * @param email String
+     * @return
+     */
+    protected boolean emptyEmailValid(String email) {
+        if (null == email || "".equals(email)) {
+            throw new BadCredentialsException("login.error.email.null");
+        }
+        return true;
+    }
+
+    /**
+     * check input username empty.
+     * 
+     * @param username String
+     * @return
+     */
+    protected boolean emptyUsernameValid(String username) {
+        if (null == username || "".equals(username)) {
+            throw new BadCredentialsException(WebContext.getI18nValue("login.error.username.null"));
+        }
+        return true;
+    }
+
+    protected boolean userinfoValid(UserInfo userInfo, String username) {
+        if (null == userInfo) {
+            String message = WebContext.getI18nValue("login.error.username");
+            _logger.debug("login user  " + username + " not in this System ." + message);
+            UserInfo loginUser = new UserInfo(username);
+            loginUser.setId(loginUser.generateId());
+            loginUser.setUsername(username);
+            loginUser.setDisplayName("not exist");
+            loginUser.setLoginCount(0);
+            authenticationRealm.insertLoginHistory(loginUser, ConstantsLoginType.LOCAL, "",
+                    WebContext.getI18nValue("login.error.username"), "user not exist");
+            throw new BadCredentialsException(WebContext.getI18nValue("login.error.username"));
+        }
+        return true;
+    }
+
+    public void setApplicationConfig(ApplicationConfig applicationConfig) {
+        this.applicationConfig = applicationConfig;
+    }
+
+    public void setAuthenticationRealm(AbstractAuthenticationRealm authenticationRealm) {
+        this.authenticationRealm = authenticationRealm;
+    }
+
+    public void setTfaOtpAuthn(AbstractOtpAuthn tfaOtpAuthn) {
+        this.tfaOtpAuthn = tfaOtpAuthn;
+    }
+
+    public void setRemeberMeService(AbstractRemeberMeService remeberMeService) {
+        this.remeberMeService = remeberMeService;
+    }
+
+    public void setOnlineTicketServices(OnlineTicketServices onlineTicketServices) {
+        this.onlineTicketServices = onlineTicketServices;
+    }
+
+	public void setSmsOtpAuthn(AbstractOtpAuthn smsOtpAuthn) {
+		this.smsOtpAuthn = smsOtpAuthn;
+	}
+}

+ 229 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/LoginCredential.java

@@ -0,0 +1,229 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+
+public class LoginCredential  implements Authentication {
+    
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 3125709257481600320L;
+    String username;
+    String password;
+    String sessionId;
+    String captcha;
+    String otpCaptcha;
+    String remeberMe;
+    String authType;
+    String jwtToken;
+    String onlineTicket;
+    String provider;
+    String code;
+    String message="SUCCESS";
+    
+    ArrayList<GrantedAuthority> grantedAuthority;
+    boolean authenticated;
+    boolean roleAdministrators;
+
+    /**
+     * BasicAuthentication.
+     */
+    public LoginCredential() {
+    }
+
+    /**
+     * BasicAuthentication.
+     */
+    public LoginCredential(String username,String password,String authType) {
+        this.username = username;
+        this.password = password;
+        this.authType = authType;
+    }
+    
+    @Override
+    public String getName() {
+        return "Login Credential";
+    }
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        return grantedAuthority;
+    }
+
+    @Override
+    public Object getCredentials() {
+        return this.getPassword();
+    }
+
+    @Override
+    public Object getDetails() {
+        return null;
+    }
+
+    @Override
+    public Object getPrincipal() {
+        return this.getUsername();
+    }
+
+    @Override
+    public boolean isAuthenticated() {
+        return authenticated;
+    }
+
+    @Override
+    public void setAuthenticated(boolean authenticated) throws IllegalArgumentException {
+        this.authenticated = authenticated;
+
+    }
+
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getSessionId() {
+        return sessionId;
+    }
+
+    public void setSessionId(String sessionId) {
+        this.sessionId = sessionId;
+    }
+
+    public String getCaptcha() {
+        return captcha;
+    }
+
+    public void setCaptcha(String captcha) {
+        this.captcha = captcha;
+    }
+
+    public String getOtpCaptcha() {
+        return otpCaptcha;
+    }
+
+    public void setOtpCaptcha(String otpCaptcha) {
+        this.otpCaptcha = otpCaptcha;
+    }
+
+    public String getRemeberMe() {
+        return remeberMe;
+    }
+
+    public void setRemeberMe(String remeberMe) {
+        this.remeberMe = remeberMe;
+    }
+
+    public String getAuthType() {
+        return authType;
+    }
+
+    public void setAuthType(String authType) {
+        this.authType = authType;
+    }
+
+    public String getJwtToken() {
+        return jwtToken;
+    }
+
+    public void setJwtToken(String jwtToken) {
+        this.jwtToken = jwtToken;
+    }
+
+    public ArrayList<GrantedAuthority> getGrantedAuthority() {
+        return grantedAuthority;
+    }
+
+    public void setGrantedAuthority(ArrayList<GrantedAuthority> grantedAuthority) {
+        this.grantedAuthority = grantedAuthority;
+    }
+
+    public String getOnlineTicket() {
+        return onlineTicket;
+    }
+
+    public void setOnlineTicket(String onlineTicket) {
+        this.onlineTicket = onlineTicket;
+    }
+
+    public boolean isRoleAdministrators() {
+        return roleAdministrators;
+    }
+
+    public void setRoleAdministrators(boolean roleAdministrators) {
+        this.roleAdministrators = roleAdministrators;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("LoginCredential [username=").append(username)
+                .append(", password=").append("******")
+                .append(", sessionId=").append(sessionId)
+                .append(", captcha=").append(captcha)
+                .append(", otpCaptcha=").append(otpCaptcha)
+                .append(", remeberMe=").append(remeberMe)
+                .append(", authType=").append(authType)
+                .append(", jwtToken=").append(jwtToken)
+                .append(", grantedAuthority=").append(grantedAuthority)
+                .append(", authenticated=").append(authenticated)
+                .append("]");
+        return builder.toString();
+    }
+}

+ 227 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/RealmAuthenticationProvider.java

@@ -0,0 +1,227 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn;
+
+import java.util.ArrayList;
+
+import org.maxkey.authn.online.OnlineTicket;
+import org.maxkey.authn.online.OnlineTicketServices;
+import org.maxkey.authn.realm.AbstractAuthenticationRealm;
+import org.maxkey.authn.support.rememberme.AbstractRemeberMeService;
+import org.maxkey.configuration.ApplicationConfig;
+import org.maxkey.entity.UserInfo;
+import org.maxkey.password.onetimepwd.AbstractOtpAuthn;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.web.authentication.WebAuthenticationDetails;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+
+/**
+ * database Authentication provider.
+ * @author Crystal.Sea
+ *
+ */
+public class RealmAuthenticationProvider extends AbstractAuthenticationProvider {
+    private static final Logger _logger =
+            LoggerFactory.getLogger(RealmAuthenticationProvider.class);
+
+    protected String getProviderName() {
+        return "RealmAuthenticationProvider";
+    }
+    
+
+    public RealmAuthenticationProvider() {
+		super();
+	}
+
+
+    public RealmAuthenticationProvider(
+    		AbstractAuthenticationRealm authenticationRealm,
+    		ApplicationConfig applicationConfig,
+    	    AbstractOtpAuthn tfaOtpAuthn,
+    	    AbstractOtpAuthn smsOtpAuthn,
+    	    AbstractRemeberMeService remeberMeService,
+    	    OnlineTicketServices onlineTicketServices) {
+		this.authenticationRealm = authenticationRealm;
+		this.applicationConfig = applicationConfig;
+		this.tfaOtpAuthn = tfaOtpAuthn;
+		this.smsOtpAuthn = smsOtpAuthn;
+		this.remeberMeService =  remeberMeService;
+		this.onlineTicketServices = onlineTicketServices;
+	}
+
+	@Override
+    protected Authentication doInternalAuthenticate(LoginCredential loginCredential) {
+
+        _logger.debug("authentication " + loginCredential);
+
+        sessionValid(loginCredential.getSessionId());
+
+        //jwtTokenValid(j_jwtToken);
+
+        authTypeValid(loginCredential.getAuthType());
+
+        captchaValid(loginCredential.getCaptcha(),loginCredential.getAuthType());
+
+        emptyPasswordValid(loginCredential.getPassword());
+
+        UserInfo userInfo = null;
+
+        emptyUsernameValid(loginCredential.getUsername());
+
+        userInfo =  loadUserInfo(loginCredential.getUsername(),loginCredential.getPassword());
+
+        userinfoValid(userInfo, loginCredential.getUsername());
+        //mfa 
+        tftcaptchaValid(loginCredential.getOtpCaptcha(),loginCredential.getAuthType(),userInfo);
+        
+        //Validate PasswordPolicy
+        authenticationRealm.getPasswordPolicyValidator().passwordPolicyValid(userInfo);
+        if(loginCredential.getAuthType().equalsIgnoreCase(AuthType.MOBILE)) {
+        	mobilecaptchaValid(loginCredential.getPassword(),loginCredential.getAuthType(),userInfo);
+        }else {            
+            //Match password 
+        	authenticationRealm.passwordMatches(userInfo, loginCredential.getPassword());
+        }
+        //apply PasswordSetType and resetBadPasswordCount
+        authenticationRealm.getPasswordPolicyValidator().applyPasswordPolicy(userInfo);
+        
+        UsernamePasswordAuthenticationToken authenticationToken = createOnlineSession(loginCredential,userInfo);
+        //RemeberMe Config check then set  RemeberMe cookies
+        if (applicationConfig.getLoginConfig().isRemeberMe()) {
+            if (loginCredential.getRemeberMe() != null && loginCredential.getRemeberMe().equals("remeberMe")) {
+                WebContext.getSession().setAttribute(
+                        WebConstants.REMEBER_ME_SESSION,loginCredential.getUsername());
+                _logger.debug("do Remeber Me");
+                remeberMeService.createRemeberMe(
+                        userInfo.getUsername(), 
+                        WebContext.getRequest(), 
+                        ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes())
+                            .getResponse()
+                );
+            }
+        }
+        
+        return  authenticationToken;
+    }
+
+    /**
+     * trustAuthentication.
+     * @param username String
+     * @param type String
+     * @param provider String
+     * @param code String
+     * @param message String
+     * @return boolean
+     */
+    @Override
+    public  Authentication authentication(LoginCredential loginCredential,boolean isTrusted) {
+        UserInfo loadeduserInfo = loadUserInfo(loginCredential.getUsername(), "");
+        if (loadeduserInfo != null) {
+            //Validate PasswordPolicy
+            authenticationRealm.getPasswordPolicyValidator().passwordPolicyValid(loadeduserInfo);
+            if(!isTrusted) {
+                authenticationRealm.passwordMatches(loadeduserInfo, loginCredential.getPassword());
+            }
+            //apply PasswordSetType and resetBadPasswordCount
+            authenticationRealm.getPasswordPolicyValidator().applyPasswordPolicy(loadeduserInfo);
+            Authentication authentication = createOnlineSession(loginCredential,loadeduserInfo);
+            
+            authenticationRealm.insertLoginHistory( loadeduserInfo, 
+                                                    loginCredential.getAuthType(), 
+                                                    loginCredential.getProvider(), 
+                                                    loginCredential.getCode(), 
+                                                    loginCredential.getMessage()
+                                                );
+            
+            return authentication;
+        }else {
+            String i18nMessage = WebContext.getI18nValue("login.error.username");
+            _logger.debug("login user {} not in this System . {}" , 
+                            loginCredential.getUsername(),i18nMessage);
+            throw new BadCredentialsException(WebContext.getI18nValue("login.error.username"));
+        }
+    }
+    
+    public UsernamePasswordAuthenticationToken createOnlineSession(LoginCredential credential,UserInfo userInfo) {
+        String currentUserSessionId = WebContext.genId();
+        //Online Tickit Id
+        String onlineTickitId = WebConstants.ONLINE_TICKET_PREFIX + "-" + currentUserSessionId;
+        _logger.debug("set online Tickit Cookie {} on domain {}",
+                        onlineTickitId, 
+                        this.applicationConfig.getBaseDomainName()
+                    );
+        
+        OnlineTicket onlineTicket = new OnlineTicket(onlineTickitId);
+        
+        //set ONLINE_TICKET cookie
+        WebContext.setCookie(WebContext.getResponse(), 
+                this.applicationConfig.getBaseDomainName(), 
+                WebConstants.ONLINE_TICKET_NAME, 
+                onlineTickitId);
+        
+        SigninPrincipal signinPrincipal = new SigninPrincipal(userInfo);
+        //set OnlineTicket
+        signinPrincipal.setOnlineTicket(onlineTicket);
+        ArrayList<GrantedAuthority> grantedAuthoritys = authenticationRealm.grantAuthority(userInfo);
+        signinPrincipal.setAuthenticated(true);
+        
+        for(GrantedAuthority administratorsAuthority : grantedAdministratorsAuthoritys) {
+            if(grantedAuthoritys.contains(administratorsAuthority)) {
+                signinPrincipal.setRoleAdministrators(true);
+                _logger.trace("ROLE ADMINISTRATORS Authentication .");
+            }
+        }
+        _logger.debug("Granted Authority {}" , grantedAuthoritys);
+        
+        signinPrincipal.setGrantedAuthorityApps(authenticationRealm.queryAuthorizedApps(grantedAuthoritys));
+        
+        UsernamePasswordAuthenticationToken authenticationToken =
+                new UsernamePasswordAuthenticationToken(
+                        signinPrincipal, 
+                        "PASSWORD", 
+                        grantedAuthoritys
+                );
+        
+        authenticationToken.setDetails(
+                new WebAuthenticationDetails(WebContext.getRequest()));
+        
+        onlineTicket.setAuthentication(authenticationToken);
+        
+        this.onlineTicketServices.store(onlineTickitId, onlineTicket);
+        
+        /*
+         *  put userInfo to current session context
+         */
+        WebContext.setUserInfo(userInfo);
+        
+        WebContext.setAuthentication(authenticationToken);
+        
+        WebContext.setAttribute(WebConstants.CURRENT_USER_SESSION_ID, currentUserSessionId);
+        return authenticationToken;
+    }
+  
+}

+ 126 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/SavedRequestAwareAuthenticationSuccessHandler.java

@@ -0,0 +1,126 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.maxkey.authn.support.rememberme.AbstractRemeberMeService;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
+import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
+import org.springframework.security.web.savedrequest.RequestCache;
+import org.springframework.security.web.savedrequest.SavedRequest;
+import org.springframework.util.StringUtils;
+
+/**
+ * An authentication success strategy which can make use of the
+ * {@link DefaultSavedRequest} which may have been stored in the session by the
+ * {@link ExceptionTranslationFilter}. When such a request is intercepted and
+ * requires authentication, the request data is stored to record the original
+ * destination before the authentication process commenced, and to allow the
+ * request to be reconstructed when a redirect to the same URL occurs. This
+ * class is responsible for performing the redirect to the original URL if
+ * appropriate.
+ * <p>
+ * Following a successful authentication, it decides on the redirect
+ * destination, based on the following scenarios:
+ * <ul>
+ * <li>If the {@code alwaysUseDefaultTargetUrl} property is set to true, the
+ * {@code defaultTargetUrl} will be used for the destination. Any
+ * {@code DefaultSavedRequest} stored in the session will be removed.</li>
+ * <li>If the {@code targetUrlParameter} has been set on the request, the value
+ * will be used as the destination. Any {@code DefaultSavedRequest} will again
+ * be removed.</li>
+ * <li>If a {@link SavedRequest} is found in the {@code RequestCache} (as set by
+ * the {@link ExceptionTranslationFilter} to record the original destination
+ * before the authentication process commenced), a redirect will be performed to
+ * the Url of that original destination. The {@code SavedRequest} object will
+ * remain cached and be picked up when the redirected request is received (See
+ * {@link org.springframework.security.web.savedrequest.SavedRequestAwareWrapper
+ * SavedRequestAwareWrapper}).</li>
+ * <li>If no {@code SavedRequest} is found, it will delegate to the base class.
+ * </li>
+ * </ul>
+ *
+ * @author Luke Taylor
+ * @since 3.0
+ */
+public class SavedRequestAwareAuthenticationSuccessHandler 
+            extends SimpleUrlAuthenticationSuccessHandler {
+    protected final Logger _logger = LoggerFactory.getLogger(
+            SavedRequestAwareAuthenticationSuccessHandler.class);
+
+    @Autowired
+    @Qualifier("remeberMeService")
+    protected AbstractRemeberMeService remeberMeService;
+
+    private RequestCache requestCache = new HttpSessionRequestCache();
+
+    @Override
+    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
+            Authentication authentication) throws ServletException, IOException {
+        SavedRequest savedRequest = requestCache.getRequest(request, response);
+
+        remeberMeService.createRemeberMe(
+                authentication.getPrincipal().toString(), request, response);
+
+        if (savedRequest == null) {
+            super.onAuthenticationSuccess(request, response, authentication);
+
+            return;
+        }
+        String targetUrlParameter = getTargetUrlParameter();
+        if (isAlwaysUseDefaultTargetUrl()
+                || (targetUrlParameter != null 
+                && StringUtils.hasText(request.getParameter(targetUrlParameter)))) {
+            requestCache.removeRequest(request, response);
+            super.onAuthenticationSuccess(request, response, authentication);
+
+            return;
+        }
+
+        clearAuthenticationAttributes(request);
+
+        // Use the DefaultSavedRequest URL
+        String targetUrl = savedRequest.getRedirectUrl();
+
+     // is cas login , with service parameter
+        logger.trace("CAS " + request.getParameter(WebConstants.CAS_SERVICE_PARAMETER));
+        if (request.getParameter(WebConstants.CAS_SERVICE_PARAMETER) != null
+                && request.getParameter(WebConstants.CAS_SERVICE_PARAMETER).startsWith("http")) {
+            targetUrl = WebContext.getHttpContextPath() + "/authz/cas/login?service="
+                    + request.getParameter(WebConstants.CAS_SERVICE_PARAMETER);
+        }
+        targetUrl = targetUrl == null ? "/forwardindex" : targetUrl;
+        logger.debug("Redirecting to DefaultSavedRequest Url: " + targetUrl);
+        getRedirectStrategy().sendRedirect(request, response, targetUrl);
+    }
+
+    public void setRequestCache(RequestCache requestCache) {
+        this.requestCache = requestCache;
+    }
+}

+ 194 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/SigninPrincipal.java

@@ -0,0 +1,194 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.maxkey.authn.online.OnlineTicket;
+import org.maxkey.entity.UserInfo;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+
+
+public class SigninPrincipal implements  UserDetails {
+    private static final long serialVersionUID = -110742975439268030L;
+    UserInfo userInfo;
+    
+    UserDetails userDetails;
+    
+    OnlineTicket onlineTicket;
+    ArrayList<GrantedAuthority> grantedAuthority;
+    ArrayList<GrantedAuthority> grantedAuthorityApps;
+    boolean authenticated;
+    boolean roleAdministrators;
+    
+	private  boolean accountNonExpired;
+
+	private  boolean accountNonLocked;
+
+	private  boolean credentialsNonExpired;
+
+	private  boolean enabled;
+
+    /**
+     * SigninPrincipal.
+     */
+    public SigninPrincipal() {
+    }
+    
+    /**
+     * SigninPrincipal.
+     */
+    public SigninPrincipal(UserInfo userInfo) {
+        this.userInfo = userInfo;
+        this.authenticated = true;
+        this.accountNonExpired = true;
+        this.accountNonLocked  = true;
+        this.credentialsNonExpired =true;
+        this.enabled = true;
+    }
+    
+    /**
+     * SigninPrincipal.
+     */
+    public SigninPrincipal(UserDetails userDetails) {
+        this.userDetails = userDetails;
+        this.authenticated = true;
+    }
+
+    public UserInfo getUserInfo() {
+        return userInfo;
+    }
+
+    public void setUserInfo(UserInfo userInfo) {
+        this.userInfo = userInfo;
+    }
+
+    public boolean isAuthenticated() {
+        return authenticated;
+    }
+
+    public void setAuthenticated(boolean authenticated) {
+        this.authenticated = authenticated;
+    }
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        return grantedAuthority;
+    }
+
+    public ArrayList<GrantedAuthority> getGrantedAuthority() {
+        return grantedAuthority;
+    }
+
+    public UserDetails getUserDetails() {
+        return userDetails;
+    }
+
+    public void setUserDetails(UserDetails userDetails) {
+        this.userDetails = userDetails;
+    }
+
+    public void setGrantedAuthority(ArrayList<GrantedAuthority> grantedAuthority) {
+        this.grantedAuthority = grantedAuthority;
+    }
+
+    public OnlineTicket getOnlineTicket() {
+        return onlineTicket;
+    }
+
+    public void setOnlineTicket(OnlineTicket onlineTicket) {
+        this.onlineTicket = onlineTicket;
+    }
+
+    public boolean isRoleAdministrators() {
+        return roleAdministrators;
+    }
+
+    public void setRoleAdministrators(boolean roleAdministrators) {
+        this.roleAdministrators = roleAdministrators;
+    }
+    
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return this.accountNonExpired;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return this.accountNonLocked;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return this.credentialsNonExpired;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return this.enabled;
+    }
+
+    public ArrayList<GrantedAuthority> getGrantedAuthorityApps() {
+        return grantedAuthorityApps;
+    }
+
+    public void setGrantedAuthorityApps(ArrayList<GrantedAuthority> grantedAuthorityApps) {
+        this.grantedAuthorityApps = grantedAuthorityApps;
+    }
+
+    @Override
+    public String getUsername() {
+        if(this.userInfo != null) {
+            return this.userInfo.getUsername();
+        }else {
+            return this.userDetails.getUsername();
+        }        
+    }
+    
+    @Override
+    public String getPassword() {
+        if(this.userInfo != null) {
+            return this.userInfo.getPassword();
+        }else {
+            return this.userDetails.getPassword();
+        }  
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("SigninPrincipal [userInfo=");
+        builder.append(userInfo);
+        builder.append(", onlineTicket=");
+        builder.append(onlineTicket);
+        builder.append(", grantedAuthority=");
+        builder.append(grantedAuthority);
+        builder.append(", authenticated=");
+        builder.append(authenticated);
+        builder.append(", roleAdministrators=");
+        builder.append(roleAdministrators);
+        builder.append("]");
+        return builder.toString();
+    }
+
+
+
+}

+ 94 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/InMemoryOnlineTicketServices.java

@@ -0,0 +1,94 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.online;
+
+import java.time.Duration;
+import java.time.LocalTime;
+import java.util.concurrent.TimeUnit;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.github.benmanes.caffeine.cache.Cache;
+import com.github.benmanes.caffeine.cache.Caffeine;
+
+
+public class InMemoryOnlineTicketServices implements OnlineTicketServices{
+    private static final Logger _logger = LoggerFactory.getLogger(InMemoryOnlineTicketServices.class);
+
+	protected  static  Cache<String, OnlineTicket> onlineTicketStore = 
+        	        Caffeine.newBuilder()
+        	            .expireAfterWrite(30, TimeUnit.MINUTES)
+        	            .maximumSize(200000)
+        	            .build();
+	
+	public InMemoryOnlineTicketServices() {
+        super();
+    }
+
+    @Override
+	public void store(String ticketId, OnlineTicket ticket) {
+	    onlineTicketStore.put(ticketId, ticket);
+	}
+
+	@Override
+	public OnlineTicket remove(String ticketId) {
+	    OnlineTicket ticket=onlineTicketStore.getIfPresent(ticketId);	
+	    onlineTicketStore.invalidate(ticketId);
+		return ticket;
+	}
+
+    @Override
+    public OnlineTicket get(String ticketId) {
+        OnlineTicket ticket=onlineTicketStore.getIfPresent(ticketId); 
+        return ticket;
+    }
+
+    @Override
+    public void setValiditySeconds(int validitySeconds) {
+        onlineTicketStore = 
+                Caffeine.newBuilder()
+                    .expireAfterWrite(validitySeconds/60, TimeUnit.MINUTES)
+                    .maximumSize(200000)
+                    .build();
+        
+    }
+
+    @Override
+    public void refresh(String ticketId,LocalTime refreshTime) {
+        OnlineTicket onlineTicket = get(ticketId);
+        onlineTicket.setTicketTime(refreshTime);
+        store(ticketId , onlineTicket);
+    }
+
+    @Override
+    public void refresh(String ticketId) {
+        OnlineTicket onlineTicket = get(ticketId);
+        
+        LocalTime currentTime = LocalTime.now();
+        Duration duration = Duration.between(currentTime, onlineTicket.getTicketTime());
+        
+        _logger.trace("OnlineTicket duration " + duration.getSeconds());
+        
+        if(duration.getSeconds() > OnlineTicket.MAX_EXPIRY_DURATION) {
+            onlineTicket.setTicketTime(currentTime);
+            refresh(ticketId,currentTime);
+        }
+    }
+
+}

+ 118 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/OnlineTicket.java

@@ -0,0 +1,118 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.online;
+
+import java.io.Serializable;
+import java.time.LocalTime;
+import java.util.HashMap;
+
+import org.maxkey.entity.apps.Apps;
+import org.springframework.security.core.Authentication;
+
+public class OnlineTicket implements Serializable{
+
+    /**
+     * 
+     */
+    
+    public static final  int    MAX_EXPIRY_DURATION = 60 * 10; //default 10 minutes.
+    
+    private static final long   serialVersionUID = 9008067569150338296L;
+
+    public String ticketId;
+    
+    public LocalTime ticketTime;
+    
+    public Authentication authentication;
+    
+    private HashMap<String , Apps> authorizedApps = new HashMap<String , Apps>();
+    
+
+    public OnlineTicket(String ticketId) {
+        super();
+        this.ticketId = ticketId;
+        this.ticketTime = LocalTime.now();
+    }
+    
+    public OnlineTicket(String ticketId,Authentication authentication) {
+        super();
+        this.ticketId = ticketId;
+        this.authentication = authentication;
+        this.ticketTime = LocalTime.now();
+    }
+    
+    
+
+    public String getTicketId() {
+        return ticketId;
+    }
+
+
+
+    public void setTicketId(String ticketId) {
+        this.ticketId = ticketId;
+    }
+
+    
+    public LocalTime getTicketTime() {
+        return ticketTime;
+    }
+
+    public void setTicketTime(LocalTime ticketTime) {
+        this.ticketTime = ticketTime;
+    }
+
+    public Authentication getAuthentication() {
+        return authentication;
+    }
+
+
+
+    public void setAuthentication(Authentication authentication) {
+        this.authentication = authentication;
+    }
+
+  
+
+    public HashMap<String, Apps> getAuthorizedApps() {
+        return authorizedApps;
+    }
+
+
+
+    public void setAuthorizedApps(HashMap<String, Apps> authorizedApps) {
+        this.authorizedApps = authorizedApps;
+    }
+    
+    public void setAuthorizedApp(Apps authorizedApp) {
+        this.authorizedApps.put(authorizedApp.getId(), authorizedApp);
+    }
+
+
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("OnlineTicket [ticketId=");
+        builder.append(ticketId);
+        builder.append("]");
+        return builder.toString();
+    }
+    
+    
+}

+ 35 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/OnlineTicketServices.java

@@ -0,0 +1,35 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.online;
+
+import java.time.LocalTime;
+
+public interface OnlineTicketServices {
+
+	public  void store(String ticketId, OnlineTicket ticket);
+
+    public  OnlineTicket remove(String ticket);
+    
+    public  OnlineTicket get(String ticketId);
+    
+    public void refresh(String ticketId ,LocalTime refreshTime);
+    
+    public void refresh(String ticketId);
+
+    public void setValiditySeconds(int validitySeconds);
+}

+ 48 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/OnlineTicketServicesFactory.java

@@ -0,0 +1,48 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.online;
+
+import org.maxkey.constants.ConstantsPersistence;
+import org.maxkey.persistence.redis.RedisConnectionFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class OnlineTicketServicesFactory {
+	private static final  Logger _logger = 
+            LoggerFactory.getLogger(OnlineTicketServicesFactory.class);
+	
+	 public OnlineTicketServices getService(
+			 	int persistence,
+			 	JdbcTemplate jdbcTemplate,
+	            RedisConnectionFactory redisConnFactory){
+		 
+		 OnlineTicketServices onlineTicketServices = null;
+		if (persistence == ConstantsPersistence.INMEMORY) {
+		    onlineTicketServices = new InMemoryOnlineTicketServices();
+		    _logger.debug("InMemoryOnlineTicketServices");
+		} else if (persistence == ConstantsPersistence.JDBC) {
+		    _logger.debug("OnlineTicketServices not support "); 
+		} else if (persistence == ConstantsPersistence.REDIS) {
+		    onlineTicketServices = new RedisOnlineTicketServices(redisConnFactory);
+		    _logger.debug("RedisOnlineTicketServices");
+		}
+		
+		return onlineTicketServices;
+	}
+}

+ 109 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/online/RedisOnlineTicketServices.java

@@ -0,0 +1,109 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.online;
+
+import java.time.Duration;
+import java.time.LocalTime;
+
+import org.maxkey.persistence.redis.RedisConnection;
+import org.maxkey.persistence.redis.RedisConnectionFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class RedisOnlineTicketServices implements OnlineTicketServices {
+    private static final Logger _logger = LoggerFactory.getLogger(RedisOnlineTicketServices.class);
+	
+	protected int serviceTicketValiditySeconds = 60 * 30; //default 30 minutes.
+	
+	RedisConnectionFactory connectionFactory;
+	
+	public static String PREFIX="REDIS_ONLINE_TICKET_";
+	/**
+	 * @param connectionFactory
+	 */
+	public RedisOnlineTicketServices(RedisConnectionFactory connectionFactory) {
+		super();
+		this.connectionFactory = connectionFactory;
+	}
+	
+	/**
+	 * 
+	 */
+	public RedisOnlineTicketServices() {
+		
+	}
+
+	public void setConnectionFactory(RedisConnectionFactory connectionFactory) {
+		this.connectionFactory = connectionFactory;
+	}
+
+	@Override
+	public void store(String ticketId, OnlineTicket ticket) {
+		RedisConnection conn=connectionFactory.getConnection();
+		conn.setexObject(PREFIX+ticketId, serviceTicketValiditySeconds, ticket);
+		conn.close();
+	}
+
+	@Override
+	public OnlineTicket remove(String ticketId) {
+		RedisConnection conn=connectionFactory.getConnection();
+		OnlineTicket ticket = conn.getObject(PREFIX+ticketId);
+		conn.delete(PREFIX+ticketId);
+		conn.close();
+		return ticket;
+	}
+
+    @Override
+    public OnlineTicket get(String ticketId) {
+        RedisConnection conn=connectionFactory.getConnection();
+        OnlineTicket ticket = conn.getObject(PREFIX+ticketId);
+        conn.close();
+        return ticket;
+    }
+
+    @Override
+    public void setValiditySeconds(int validitySeconds) {
+       this.serviceTicketValiditySeconds = validitySeconds;
+        
+    }
+
+    @Override
+    public void refresh(String ticketId,LocalTime refreshTime) {
+        OnlineTicket onlineTicket = get(ticketId);
+        onlineTicket.setTicketTime(refreshTime);
+        store(ticketId , onlineTicket);
+    }
+    
+    @Override
+    public void refresh(String ticketId) {
+        OnlineTicket onlineTicket = get(ticketId);
+        
+        LocalTime currentTime = LocalTime.now();
+        Duration duration = Duration.between(currentTime, onlineTicket.getTicketTime());
+        
+        _logger.trace("OnlineTicket duration " + duration.getSeconds());
+        
+        if(duration.getSeconds() > OnlineTicket.MAX_EXPIRY_DURATION) {
+            onlineTicket.setTicketTime(currentTime);
+            refresh(ticketId,currentTime);
+        }
+    }
+
+	
+}

+ 262 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/AbstractAuthenticationRealm.java

@@ -0,0 +1,262 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import org.maxkey.authn.support.rememberme.AbstractRemeberMeService;
+import org.maxkey.entity.Groups;
+import org.maxkey.entity.HistoryLogin;
+import org.maxkey.entity.UserInfo;
+import org.maxkey.persistence.db.LoginHistoryService;
+import org.maxkey.persistence.db.PasswordPolicyValidator;
+import org.maxkey.persistence.service.UserInfoService;
+import org.maxkey.persistence.db.LoginService;
+import org.maxkey.util.DateUtils;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.security.core.GrantedAuthority;
+
+/**
+ * AbstractAuthenticationRealm.
+ * @author Crystal.Sea
+ *
+ */
+public abstract class AbstractAuthenticationRealm {
+    private static Logger _logger = LoggerFactory.getLogger(AbstractAuthenticationRealm.class);
+
+    protected JdbcTemplate jdbcTemplate;
+    
+    protected boolean provisioning;
+    
+    protected PasswordPolicyValidator passwordPolicyValidator;
+    
+    protected LoginService loginService;
+
+    protected LoginHistoryService loginHistoryService;
+
+    protected AbstractRemeberMeService remeberMeService;
+    
+    protected boolean ldapSupport;
+    
+    protected  AbstractAuthenticationRealm ldapAuthenticationRealm;
+    
+    protected UserInfoService userInfoService;
+    
+   
+
+    /**
+     * 
+     */
+    public AbstractAuthenticationRealm() {
+
+    }
+
+    public AbstractAuthenticationRealm(JdbcTemplate jdbcTemplate) {
+        this.jdbcTemplate = jdbcTemplate;
+    }
+
+    public PasswordPolicyValidator getPasswordPolicyValidator() {
+        return passwordPolicyValidator;
+    }
+
+    public LoginService getUserInfoLoginService() {
+        return loginService;
+    }
+
+    public UserInfo loadUserInfo(String username, String password) {
+        return loginService.loadUserInfo(username, password);
+    }
+
+    public abstract boolean passwordMatches(UserInfo userInfo, String password);
+    
+
+    public static boolean isAuthenticated() {
+        if (WebContext.getUserInfo() != null) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+
+    public List<Groups> queryGroups(UserInfo userInfo) {
+       return loginService.queryGroups(userInfo);
+    }
+
+    /**
+     * grant Authority by userinfo
+     * 
+     * @param userInfo
+     * @return ArrayList<GrantedAuthority>
+     */
+    public ArrayList<GrantedAuthority> grantAuthority(UserInfo userInfo) {
+        return loginService.grantAuthority(userInfo);
+    }
+    
+    /**
+     * grant Authority by grantedAuthoritys
+     * 
+     * @param grantedAuthoritys
+     * @return ArrayList<GrantedAuthority Apps>
+     */
+    public ArrayList<GrantedAuthority> queryAuthorizedApps(ArrayList<GrantedAuthority> grantedAuthoritys) {
+        return loginService.queryAuthorizedApps(grantedAuthoritys);
+    }
+
+    /**
+     * login log write to log db
+     * 
+     * @param uid
+     * @param j_username
+     * @param type
+     * @param code
+     * @param message
+     */
+    public boolean insertLoginHistory(UserInfo userInfo, String type, String provider, String code, String message) {
+        HistoryLogin historyLogin = new HistoryLogin();
+        historyLogin.setSessionId(WebContext.genId());
+        historyLogin.setSessionStatus(7);
+        if(WebContext.getAttribute(WebConstants.CURRENT_USER_SESSION_ID) !=null) {
+            historyLogin.setSessionStatus(1);
+            historyLogin.setSessionId(WebContext.getAttribute(WebConstants.CURRENT_USER_SESSION_ID).toString());
+        }
+        
+        _logger.debug("user session id is {} . ",historyLogin.getSessionId());
+        
+        userInfo.setLastLoginTime(DateUtils.formatDateTime(new Date()));
+        userInfo.setLastLoginIp(WebContext.getRequestIpAddress());
+        
+        Browser browser = resolveBrowser();
+        historyLogin.setBrowser(browser.getName());
+        historyLogin.setPlatform(browser.getPlatform());
+        historyLogin.setSourceIp(userInfo.getLastLoginIp());
+        historyLogin.setProvider(provider);
+        historyLogin.setCode(code);
+        historyLogin.setLoginType(type);
+        historyLogin.setMessage(message);
+        historyLogin.setUserId(userInfo.getId());
+        historyLogin.setUsername(userInfo.getUsername());
+        historyLogin.setDisplayName(userInfo.getDisplayName());
+        
+        loginHistoryService.login(historyLogin);
+        
+        loginService.setLastLoginInfo(userInfo);
+
+        return true;
+    }
+
+    /**
+     * logout user and remove RemeberMe token 
+     * @param response
+     * @return
+     */
+    public boolean logout(HttpServletResponse response) {
+        if (isAuthenticated()) {
+            Object sessionIdAttribute = WebContext.getAttribute(WebConstants.CURRENT_USER_SESSION_ID);
+            UserInfo userInfo = WebContext.getUserInfo();
+            userInfo.setLastLogoffTime(DateUtils.formatDateTime(new Date()));
+            
+            if (sessionIdAttribute != null) {
+                remeberMeService.removeRemeberMe(response);
+
+                loginHistoryService.logoff(userInfo.getLastLogoffTime(), sessionIdAttribute.toString());
+            }
+            
+            loginService.setLastLogoffInfo(userInfo);
+            
+            _logger.debug("Session " + WebContext.getAttribute(WebConstants.CURRENT_USER_SESSION_ID) + ", user "
+                    + userInfo.getUsername() + " Logout, datetime " + userInfo.getLastLogoffTime() + " .");
+          //remove login user session id
+            WebContext.removeAttribute(WebConstants.CURRENT_USER_SESSION_ID);
+        }
+        return true;
+
+    }
+    
+    
+    public Browser  resolveBrowser() {
+        Browser browser =new Browser();
+        String userAgent = WebContext.getRequest().getHeader("User-Agent");
+        String[] arrayUserAgent = null;
+        if (userAgent.indexOf("MSIE") > 0) {
+            arrayUserAgent = userAgent.split(";");
+            browser.setName(arrayUserAgent[1].trim());
+            browser.setPlatform(arrayUserAgent[2].trim());
+        } else if (userAgent.indexOf("Trident") > 0) {
+            arrayUserAgent = userAgent.split(";");
+            browser.setName( "MSIE/" + arrayUserAgent[3].split("\\)")[0]);
+
+            browser.setPlatform( arrayUserAgent[0].split("\\(")[1]);
+        } else if (userAgent.indexOf("Chrome") > 0) {
+            arrayUserAgent = userAgent.split(" ");
+            // browser=arrayUserAgent[8].trim();
+            for (int i = 0; i < arrayUserAgent.length; i++) {
+                if (arrayUserAgent[i].contains("Chrome")) {
+                    browser.setName( arrayUserAgent[i].trim());
+                    browser.setName( browser.getName().substring(0, browser.getName().indexOf('.')));
+                }
+            }
+            browser.setPlatform( (arrayUserAgent[1].substring(1) + " " + arrayUserAgent[2] + " "
+                    + arrayUserAgent[3].substring(0, arrayUserAgent[3].length() - 1)).trim());
+        } else if (userAgent.indexOf("Firefox") > 0) {
+            arrayUserAgent = userAgent.split(" ");
+            for (int i = 0; i < arrayUserAgent.length; i++) {
+                if (arrayUserAgent[i].contains("Firefox")) {
+                    browser.setName( arrayUserAgent[i].trim());
+                    browser.setName(browser.getName().substring(0, browser.getName().indexOf('.')));
+                }
+            }
+            browser.setPlatform( (arrayUserAgent[1].substring(1) + " " + arrayUserAgent[2] + " "
+                    + arrayUserAgent[3].substring(0, arrayUserAgent[3].length() - 1)).trim());
+
+        }
+        
+        return browser;
+    }
+    
+    
+    public class Browser{
+        
+        private  String platform;
+        
+        private  String name;
+        
+        public String getPlatform() {
+            return platform;
+        }
+        public void setPlatform(String platform) {
+            this.platform = platform;
+        }
+        public String getName() {
+            return name;
+        }
+        public void setName(String browser) {
+            this.name = browser;
+        }
+        
+        
+    }
+    
+}

+ 29 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/IAuthenticationServer.java

@@ -0,0 +1,29 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm;
+
+/**
+ * IAuthenticationServer .
+ * @author Crystal.Sea
+ *
+ */
+public interface IAuthenticationServer {
+
+    public boolean authenticate(String username, String password);
+
+}

+ 74 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/activedirectory/ActiveDirectoryAuthenticationRealm.java

@@ -0,0 +1,74 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm.activedirectory;
+
+import java.util.List;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.maxkey.authn.realm.AbstractAuthenticationRealm;
+import org.maxkey.authn.realm.IAuthenticationServer;
+import org.maxkey.entity.UserInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+
+public class ActiveDirectoryAuthenticationRealm extends AbstractAuthenticationRealm{
+	private final static Logger _logger = LoggerFactory.getLogger(ActiveDirectoryAuthenticationRealm.class);
+
+	@NotNull
+    @Size(min=1)
+    private List<IAuthenticationServer> activeDirectoryServers;
+
+	/**
+	 * 
+	 */
+	public ActiveDirectoryAuthenticationRealm() {
+		super();
+	}
+
+	/**
+	 * @param jdbcTemplate
+	 */
+	public ActiveDirectoryAuthenticationRealm(JdbcTemplate jdbcTemplate) {
+		super(jdbcTemplate);
+	}
+
+
+	@Override
+	public boolean passwordMatches(UserInfo userInfo, String password) {
+		boolean isAuthenticated=false;
+		for (final IAuthenticationServer activeDirectoryServer : this.activeDirectoryServers) {
+            _logger.debug("Attempting to authenticate {} at {}", userInfo.getUsername(), activeDirectoryServer);
+            isAuthenticated= activeDirectoryServer.authenticate(userInfo.getUsername(), password);
+            if (isAuthenticated ) {
+            	return true;
+            }
+		 }
+		return false;
+	}
+
+
+	public void setActiveDirectoryServers(
+			List<IAuthenticationServer> activeDirectoryServers) {
+		this.activeDirectoryServers = activeDirectoryServers;
+	}
+
+}

+ 78 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/activedirectory/ActiveDirectoryServer.java

@@ -0,0 +1,78 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm.activedirectory;
+
+import org.maxkey.authn.realm.IAuthenticationServer;
+import org.maxkey.persistence.ldap.ActiveDirectoryUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Crystal.Sea
+ *
+ */
+public final class ActiveDirectoryServer implements IAuthenticationServer {
+	private final static Logger _logger = LoggerFactory.getLogger(ActiveDirectoryServer.class);
+
+	ActiveDirectoryUtils activeDirectoryUtils;
+
+	String filter;
+	
+	/* (non-Javadoc)
+	 * @see com.connsec.web.authentication.realm.IAuthenticationServer#authenticate(java.lang.String, java.lang.String)
+	 */
+	@Override
+	public boolean authenticate(String username, String password) {
+		ActiveDirectoryUtils ldapPassWordValid = 
+    		        new ActiveDirectoryUtils(
+    		                activeDirectoryUtils.getProviderUrl(),
+    		                username, 
+    		                password,
+    		                activeDirectoryUtils.getDomain()
+    		         );
+		ldapPassWordValid.openConnection();
+		if(ldapPassWordValid.getCtx()!=null){
+			_logger.debug("Active Directory user " + username + "  is validate .");
+			ldapPassWordValid.close();
+			return true;
+		}
+		
+		ldapPassWordValid.close();
+		return false;
+	}
+
+	public ActiveDirectoryUtils getActiveDirectoryUtils() {
+		return activeDirectoryUtils;
+	}
+
+	public void setActiveDirectoryUtils(ActiveDirectoryUtils activeDirectoryUtils) {
+		this.activeDirectoryUtils = activeDirectoryUtils;
+	}
+
+	public String getFilter() {
+		return filter;
+	}
+
+	public void setFilter(String filter) {
+		this.filter = filter;
+	}
+
+}

+ 138 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/jdbc/JdbcAuthenticationRealm.java

@@ -0,0 +1,138 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm.jdbc;
+
+import org.maxkey.authn.realm.AbstractAuthenticationRealm;
+import org.maxkey.authn.support.rememberme.AbstractRemeberMeService;
+import org.maxkey.constants.ConstantsLoginType;
+import org.maxkey.entity.UserInfo;
+import org.maxkey.persistence.db.LoginHistoryService;
+import org.maxkey.persistence.db.LoginService;
+import org.maxkey.persistence.db.PasswordPolicyValidator;
+import org.maxkey.persistence.service.UserInfoService;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+/**
+ * JdbcAuthenticationRealm.
+ * @author Crystal.Sea
+ *
+ */
+public class JdbcAuthenticationRealm extends AbstractAuthenticationRealm {
+    private static Logger _logger = LoggerFactory.getLogger(JdbcAuthenticationRealm.class);
+
+    protected PasswordEncoder passwordEncoder;
+    
+    public JdbcAuthenticationRealm() {
+        _logger.debug("init . ");
+    }
+
+    public JdbcAuthenticationRealm(JdbcTemplate jdbcTemplate) {
+        this.jdbcTemplate = jdbcTemplate;
+    }
+    
+    public JdbcAuthenticationRealm(
+    		PasswordEncoder passwordEncoder,
+    		PasswordPolicyValidator passwordPolicyValidator,
+    		LoginService loginService,
+    		LoginHistoryService loginHistoryService,
+    		AbstractRemeberMeService remeberMeService,
+    		UserInfoService userInfoService,
+    	    JdbcTemplate jdbcTemplate) {
+    	
+    	this.passwordEncoder =passwordEncoder;
+    	this.passwordPolicyValidator=passwordPolicyValidator;
+    	this.loginService = loginService;
+    	this.loginHistoryService = loginHistoryService;
+    	this.remeberMeService = remeberMeService;
+    	 this.userInfoService = userInfoService;
+        this.jdbcTemplate = jdbcTemplate;
+    }
+    
+    
+    public JdbcAuthenticationRealm(
+    		PasswordEncoder passwordEncoder,
+    		PasswordPolicyValidator passwordPolicyValidator,
+    		LoginService loginService,
+    		LoginHistoryService loginHistoryService,
+    		AbstractRemeberMeService remeberMeService,
+    		UserInfoService userInfoService,
+    	    JdbcTemplate jdbcTemplate,
+    	    AbstractAuthenticationRealm ldapAuthenticationRealm,
+    	    boolean ldapSupport
+    	    ) {
+    	
+    	this.passwordEncoder =passwordEncoder;
+    	this.passwordPolicyValidator=passwordPolicyValidator;
+    	this.loginService = loginService;
+    	this.loginHistoryService = loginHistoryService;
+    	this.remeberMeService = remeberMeService;
+        this.jdbcTemplate = jdbcTemplate;
+        this.ldapAuthenticationRealm = ldapAuthenticationRealm;
+        this.userInfoService = userInfoService;
+        this.ldapSupport = ldapSupport;
+    }
+    
+    /**
+     * passwordMatches.
+     */
+    public boolean passwordMatches(UserInfo userInfo, String password) {
+        boolean passwordMatches = false;
+        //jdbc password check
+        //_logger.trace("password : " 
+        //        + PasswordReciprocal.getInstance().rawPassword(userInfo.getUsername(), password));
+        passwordMatches = passwordEncoder.matches(password,userInfo.getPassword());
+        
+        //passwordMatches == false and ldapSupport ==true
+        //validate password with LDAP
+        if(!passwordMatches && ldapSupport) {
+            passwordMatches =this.ldapAuthenticationRealm.passwordMatches(userInfo, password);
+            if(passwordMatches) {
+                //init password to local Realm
+                UserInfo changePasswordUser = new UserInfo();
+                changePasswordUser.setId(userInfo.getId());
+                changePasswordUser.setUsername(userInfo.getUsername());
+                changePasswordUser.setPassword(password);
+                userInfoService.changePassword(changePasswordUser, false);
+            }
+        }
+        
+        _logger.debug("passwordvalid : {}" , passwordMatches);
+        if (!passwordMatches) {
+            passwordPolicyValidator.plusBadPasswordCount(userInfo);
+            insertLoginHistory(userInfo, ConstantsLoginType.LOCAL, "", "xe00000004", "password error");
+            
+            if(userInfo.getBadPasswordCount()>=(passwordPolicyValidator.getPasswordPolicy().getAttempts()/2)) {
+                throw new BadCredentialsException(
+                        WebContext.getI18nValue("login.error.password.attempts",
+                                new Object[]{
+                                        userInfo.getBadPasswordCount() + 1,
+                                        passwordPolicyValidator.getPasswordPolicy().getAttempts(),
+                                        passwordPolicyValidator.getPasswordPolicy().getDuration()}));
+            }else {
+                throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
+            }
+        }
+        return passwordMatches;
+    }
+
+}

+ 72 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/ldap/LdapAuthenticationRealm.java

@@ -0,0 +1,72 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm.ldap;
+
+import java.util.List;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.maxkey.authn.realm.AbstractAuthenticationRealm;
+import org.maxkey.authn.realm.IAuthenticationServer;
+import org.maxkey.entity.UserInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class LdapAuthenticationRealm  extends AbstractAuthenticationRealm{
+	private final static Logger _logger = LoggerFactory.getLogger(LdapAuthenticationRealm.class);
+	
+	@NotNull
+    @Size(min=1)
+    private List<IAuthenticationServer> ldapServers;
+	
+	/**
+	 * 
+	 */
+	public LdapAuthenticationRealm() {
+		
+	}
+
+	/**
+	 * @param jdbcTemplate
+	 */
+	public LdapAuthenticationRealm(JdbcTemplate jdbcTemplate) {
+		super(jdbcTemplate);
+	}
+	
+	
+	@Override
+	public boolean passwordMatches(UserInfo userInfo, String password) {
+		 boolean isAuthenticated=false;
+		 for (final IAuthenticationServer ldapServer : this.ldapServers) {
+            _logger.debug("Attempting to authenticate {} at {}", userInfo.getUsername(), ldapServer);
+            isAuthenticated= ldapServer.authenticate(userInfo.getUsername(), password);
+            if (isAuthenticated ) {
+            	return true;
+            }
+		 }
+		return false;
+	}
+
+	public void setLdapServers(List<IAuthenticationServer> ldapServers) {
+		this.ldapServers = ldapServers;
+	}
+
+
+}

+ 98 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/ldap/LdapServer.java

@@ -0,0 +1,98 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.realm.ldap;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
+import org.maxkey.authn.realm.IAuthenticationServer;
+import org.maxkey.persistence.ldap.LdapUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Crystal.Sea
+ *
+ */
+public final class LdapServer implements IAuthenticationServer {
+	private final static Logger _logger = LoggerFactory.getLogger(LdapServer.class);
+	
+	LdapUtils ldapUtils;
+	
+	String filterAttribute;
+	
+	/* (non-Javadoc)
+	 * @see com.connsec.web.authentication.realm.IAuthenticationServer#authenticate(java.lang.String, java.lang.String)
+	 */
+	@Override
+	public boolean authenticate(String username, String password) {
+		String queryFilter = String.format(filterAttribute, username);
+		_logger.info(" filter : " + queryFilter);
+		String dn="";
+		SearchControls constraints = new SearchControls();
+		constraints.setSearchScope(ldapUtils.getSearchScope());
+		try {
+			NamingEnumeration<SearchResult> results = ldapUtils.getConnection()
+					.search(ldapUtils.getBaseDN(), queryFilter, constraints);
+			
+			if (results == null || !results.hasMore()) {
+				_logger.error("Ldap user "+username +" not found . ");
+				return false;
+			}else{
+				while (results != null && results.hasMore()) {
+					SearchResult sr = (SearchResult) results.next();
+					//String rdn = sr.getName();
+					dn = sr.getNameInNamespace();
+					_logger.debug("Directory user dn is "+dn+" .");
+				}
+			}
+		} catch (NamingException e) {
+			_logger.error("query throw NamingException:" + e.getMessage());
+		} finally {
+			//ldapUtils.close();
+		}
+		
+		LdapUtils ldapPassWordValid=new LdapUtils(ldapUtils.getProviderUrl(),dn,password);
+		ldapPassWordValid.openConnection();
+		if(ldapPassWordValid.getCtx()!=null){
+			_logger.debug("Directory user " + username + "  is validate .");
+			ldapPassWordValid.close();
+			return true;
+		}
+		return false;
+	}
+	
+	public LdapUtils getLdapUtils() {
+		return ldapUtils;
+	}
+	public void setLdapUtils(LdapUtils ldapUtils) {
+		this.ldapUtils = ldapUtils;
+	}
+	public String getFilterAttribute() {
+		return filterAttribute;
+	}
+	public void setFilterAttribute(String filterAttribute) {
+		this.filterAttribute = filterAttribute;
+	}
+
+}

+ 149 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/basic/BasicEntryPoint.java

@@ -0,0 +1,149 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.basic;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.maxkey.authn.AbstractAuthenticationProvider;
+import org.maxkey.authn.LoginCredential;
+import org.maxkey.constants.ConstantsLoginType;
+import org.maxkey.util.AuthorizationHeaderCredential;
+import org.maxkey.util.AuthorizationHeaderUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.web.servlet.AsyncHandlerInterceptor;
+
+public class BasicEntryPoint implements   AsyncHandlerInterceptor {
+	private static final Logger _logger = LoggerFactory.getLogger(BasicEntryPoint.class);
+	
+	boolean enable;
+	
+	@Autowired
+    @Qualifier("authenticationProvider")
+	AbstractAuthenticationProvider authenticationProvider ;
+	
+	public BasicEntryPoint() {
+	    
+    }
+	
+	public BasicEntryPoint(boolean enable) {
+        super();
+        this.enable = enable;
+    }
+
+    String []skipRequestURI={
+			"/oauth/v20/token",
+			"/oauth/v10a/request_token",
+			"/oauth/v10a/access_token"
+	};
+	
+	 @Override
+	 public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
+		 
+		 if(!enable){
+			 return true;
+		 }
+		 String requestPath=request.getServletPath();
+		 _logger.debug("HttpHeader Login Start ...");
+		 _logger.info("Request url : "+ request.getRequestURL());
+		 _logger.info("Request URI : "+ request.getRequestURI());
+		 _logger.info("Request ContextPath : "+ request.getContextPath());
+		 _logger.info("Request ServletPath : "+ request.getServletPath());
+		 _logger.debug("RequestSessionId : "+ request.getRequestedSessionId());
+		 _logger.debug("isRequestedSessionIdValid : "+ request.isRequestedSessionIdValid());
+		 _logger.debug("getSession : "+ request.getSession(false));
+		 
+		 for(int i=0;i<skipRequestURI.length;i++){
+			 if(skipRequestURI[i].indexOf(requestPath)>-1){
+				 _logger.info("skip uri : "+ requestPath);
+				 return true;
+			 }
+		 }
+		
+		// session not exists,session timeout,recreate new session
+		 if(request.getSession(false) == null) {
+		    _logger.info("recreate new session .");
+			request.getSession(true);
+		 }
+		 String basicCredential =request.getHeader(AuthorizationHeaderUtils.AUTHORIZATION_HEADERNAME);
+		 _logger.info("getSession.getId : "+ request.getSession().getId());
+		 
+		 _logger.info("Authorization : " + basicCredential);
+		
+		
+		 if(basicCredential==null||basicCredential.equals("")){
+			 _logger.info("Authentication fail header Authorization is null . ");
+			 return false;
+		 }
+		 
+		 AuthorizationHeaderCredential headerCredential = null;
+		 
+		 if(AuthorizationHeaderUtils.isBasic(basicCredential)){
+			 headerCredential=AuthorizationHeaderUtils.resolve(basicCredential);
+		 }else{
+			 return false;
+		 }
+		 if(headerCredential.getUsername()==null||headerCredential.getUsername().equals("")){
+			 _logger.info("Authentication fail username is null . ");
+			 return false;
+		 }
+		 if(headerCredential.getCredential()==null||headerCredential.getCredential().equals("")){
+			 _logger.info("Authentication fail password is null . ");
+			 return false;
+		 }
+		 
+		 boolean isAuthenticated=false;
+		 
+		 if(SecurityContextHolder.getContext().getAuthentication() == null) {
+			 _logger.info("Security Authentication  is  null .");
+			 isAuthenticated=false;
+		 }else {
+			 _logger.info("Security Authentication   not null . ");
+			 UsernamePasswordAuthenticationToken authenticationToken = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
+			 String lastSessionUserName = authenticationToken.getPrincipal().toString();
+			 _logger.info("Authentication Principal : " + lastSessionUserName);
+			 if (lastSessionUserName != null && !lastSessionUserName.equals(headerCredential.getUsername())) {
+				isAuthenticated=false;
+			 }else{
+				isAuthenticated=true;
+			 }
+		 }
+		 
+		 if(!isAuthenticated){
+		     LoginCredential loginCredential =new LoginCredential(headerCredential.getUsername(),"",ConstantsLoginType.BASIC);
+			 authenticationProvider.authentication(loginCredential,true);
+			 _logger.info("Authentication  "+headerCredential.getUsername()+" successful .");
+		 }
+		
+		 return true;
+	}
+
+	/**
+	 * @param enable the enable to set
+	 */
+	public void setEnable(boolean enable) {
+		this.enable = enable;
+	}
+
+	
+}

+ 98 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/certs/HttpCertsEntryPoint.java

@@ -0,0 +1,98 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.certs;
+
+import java.security.cert.X509Certificate;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.maxkey.authn.AbstractAuthenticationProvider;
+import org.maxkey.authn.support.httpheader.HttpHeaderEntryPoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.web.servlet.AsyncHandlerInterceptor;
+
+public class HttpCertsEntryPoint  implements AsyncHandlerInterceptor {
+	private static final Logger _logger = LoggerFactory.getLogger(HttpHeaderEntryPoint.class);
+	
+	static String CERTIFICATE_ATTRIBUTE = "javax.servlet.request.X509Certificate";
+	static String PEER_CERTIFICATES_ATTRIBUTE = "javax.net.ssl.peer_certificates";
+	
+    boolean enable;
+    
+    @Autowired
+    @Qualifier("authenticationProvider")
+    AbstractAuthenticationProvider authenticationProvider ;
+    
+    @Override
+	 public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
+		 
+		 if(!enable){
+			 return true;
+		 }
+
+		 _logger.debug("Certificate Login Start ...");
+		 _logger.debug("Request url : "+ request.getRequestURL());
+		 _logger.debug("Request URI : "+ request.getRequestURI());
+		 _logger.trace("Request ContextPath : "+ request.getContextPath());
+		 _logger.trace("Request ServletPath : "+ request.getServletPath());
+		 _logger.trace("RequestSessionId : "+ request.getRequestedSessionId());
+		 _logger.trace("isRequestedSessionIdValid : "+ request.isRequestedSessionIdValid());
+		 _logger.trace("getSession : "+ request.getSession(false));
+		 
+		X509Certificate[] certificates= (X509Certificate[])request.getAttribute(CERTIFICATE_ATTRIBUTE); // 2.2 spec
+		if (certificates == null) {
+			 certificates = (X509Certificate[]) request.getAttribute(PEER_CERTIFICATES_ATTRIBUTE); // 2.1 spec
+        }
+		
+		for (X509Certificate cert : certificates) {
+			cert.checkValidity();
+			_logger.debug("cert validated");
+			_logger.debug("cert infos " + cert.toString());
+			_logger.debug("Version " + cert.getVersion());
+			_logger.debug("SerialNumber " + cert.getSerialNumber().toString(16));
+			_logger.debug("SubjectDN " + cert.getSubjectDN());
+			_logger.debug("IssuerDN " + cert.getIssuerDN());
+			_logger.debug("NotBefore " + cert.getNotBefore());
+			_logger.debug("SigAlgName " + cert.getSigAlgName());
+		    byte[] sign = cert.getSignature();
+		    _logger.debug("Signature ");
+		    for (int j = 0; j < sign.length; j++){
+		    	_logger.debug(sign[j] + ",");
+		    }
+		    java.security.PublicKey pk = cert.getPublicKey();
+		    byte[] pkenc = pk.getEncoded();
+		    _logger.debug("PublicKey ");
+		    for (int j = 0; j < pkenc.length; j++){
+		    	_logger.debug(pkenc[j] + ",");
+		    }
+		}
+		 return true;
+    }
+
+	public HttpCertsEntryPoint(boolean enable, AbstractAuthenticationProvider authenticationProvider) {
+		super();
+		this.enable = enable;
+		this.authenticationProvider = authenticationProvider;
+	}
+    
+    
+}

+ 146 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/httpheader/HttpHeaderEntryPoint.java

@@ -0,0 +1,146 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.httpheader;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.maxkey.authn.AbstractAuthenticationProvider;
+import org.maxkey.authn.LoginCredential;
+import org.maxkey.constants.ConstantsLoginType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.web.servlet.AsyncHandlerInterceptor;
+
+
+public class HttpHeaderEntryPoint implements AsyncHandlerInterceptor {
+	private static final Logger _logger = LoggerFactory.getLogger(HttpHeaderEntryPoint.class);
+	
+	String headerName;
+    boolean enable;
+    
+    @Autowired
+    @Qualifier("authenticationProvider")
+    AbstractAuthenticationProvider authenticationProvider ;
+	
+	String []skipRequestURI={
+			"/oauth/v20/token",
+			"/oauth/v10a/request_token",
+			"/oauth/v10a/access_token"
+	};
+	
+	 @Override
+	 public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
+		 
+		 if(!enable){
+			 return true;
+		 }
+		 String requestPath=request.getServletPath();
+		 _logger.trace("HttpHeader Login Start ...");
+		 _logger.trace("Request url : "+ request.getRequestURL());
+		 _logger.trace("Request URI : "+ request.getRequestURI());
+		 _logger.trace("Request ContextPath : "+ request.getContextPath());
+		 _logger.trace("Request ServletPath : "+ request.getServletPath());
+		 _logger.trace("RequestSessionId : "+ request.getRequestedSessionId());
+		 _logger.trace("isRequestedSessionIdValid : "+ request.isRequestedSessionIdValid());
+		 _logger.trace("getSession : "+ request.getSession(false));
+		 
+		 for(int i=0;i<skipRequestURI.length;i++){
+			 if(skipRequestURI[i].indexOf(requestPath)>-1){
+				 _logger.trace("skip uri : "+ requestPath);
+				 return true;
+			 }
+		 }
+		
+		
+		 
+		// session not exists,session timeout,recreate new session
+		 if(request.getSession(false) == null) {
+		    _logger.trace("recreate new session .");
+			request.getSession(true);
+		 }
+		 
+		 _logger.trace("getSession.getId : "+ request.getSession().getId());
+		 String httpHeaderUsername = request.getHeader(headerName);
+
+		 _logger.trace("HttpHeader username : " + httpHeaderUsername);
+		
+		
+		 if(httpHeaderUsername==null||httpHeaderUsername.equals("")){
+			 _logger.info("Authentication fail HttpHeader is null . ");
+			 return false;
+		 }
+		 
+		 boolean isAuthenticated=false;
+		 
+		 if(SecurityContextHolder.getContext().getAuthentication() == null) {
+			 _logger.info("Security Authentication  is  null .");
+			 isAuthenticated=false;
+		 }else {
+			 _logger.info("Security Authentication   not null . ");
+			 UsernamePasswordAuthenticationToken authenticationToken = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
+			 String lastSessionUserName = authenticationToken.getPrincipal().toString();
+			 _logger.info("Authentication Principal : " + lastSessionUserName);
+			 if (lastSessionUserName != null && !lastSessionUserName.equals(httpHeaderUsername)) {
+				isAuthenticated=false;
+			 }else{
+				isAuthenticated=true;
+			 }
+		 }
+		 
+		 if(!isAuthenticated){
+			LoginCredential loginCredential =new LoginCredential(httpHeaderUsername,"",ConstantsLoginType.HTTPHEADER);
+            authenticationProvider.authentication(loginCredential,true);
+			_logger.info("Authentication  "+httpHeaderUsername+" successful .");
+		 }
+		
+		 return true;
+	}
+
+	 public HttpHeaderEntryPoint() {
+	        super();
+	 }
+
+    public HttpHeaderEntryPoint(String headerName, boolean enable) {
+        super();
+        this.headerName = headerName;
+        this.enable = enable;
+    }
+
+    public String getHeaderName() {
+        return headerName;
+    }
+
+    public void setHeaderName(String headerName) {
+        this.headerName = headerName;
+    }
+
+    public boolean isEnable() {
+        return enable;
+    }
+
+    public void setEnable(boolean enable) {
+        this.enable = enable;
+    }
+	 
+	
+}

+ 127 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/jwt/HttpJwtEntryPoint.java

@@ -0,0 +1,127 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.jwt;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.maxkey.authn.AbstractAuthenticationProvider;
+import org.maxkey.authn.LoginCredential;
+import org.maxkey.configuration.ApplicationConfig;
+import org.maxkey.constants.ConstantsLoginType;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.servlet.AsyncHandlerInterceptor;
+
+import com.nimbusds.jwt.SignedJWT;
+
+
+public class HttpJwtEntryPoint implements AsyncHandlerInterceptor {
+	private static final Logger _logger = LoggerFactory.getLogger(HttpJwtEntryPoint.class);
+	
+    boolean enable;
+    
+  	ApplicationConfig applicationConfig;
+    
+    AbstractAuthenticationProvider authenticationProvider ;
+    
+	JwtLoginService jwtLoginService;
+	
+	 @Override
+	 public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
+		 boolean isAuthenticated= WebContext.isAuthenticated();
+		 String jwt = request.getParameter(WebConstants.JWT_TOKEN_PARAMETER);
+		 
+		 if(!enable 
+				 || isAuthenticated 
+				 || jwt == null){
+			 return true;
+		 }
+		 
+		 _logger.debug("JWT Login Start ...");
+		 _logger.trace("Request url : "+ request.getRequestURL());
+		 _logger.trace("Request URI : "+ request.getRequestURI());
+		 _logger.trace("Request ContextPath : "+ request.getContextPath());
+		 _logger.trace("Request ServletPath : "+ request.getServletPath());
+		 _logger.trace("RequestSessionId : "+ request.getRequestedSessionId());
+		 _logger.trace("isRequestedSessionIdValid : "+ request.isRequestedSessionIdValid());
+		 _logger.trace("getSession : "+ request.getSession(false));
+		 
+		// session not exists,session timeout,recreate new session
+		 if(request.getSession(false) == null) {
+		    _logger.trace("recreate new session .");
+			request.getSession(true);
+		 }
+		 
+		 _logger.trace("getSession.getId : "+ request.getSession().getId());
+
+		//for jwt Login
+		 _logger.debug("jwt : " + jwt);
+
+		 SignedJWT signedJWT = jwtLoginService.jwtTokenValidation(jwt);
+		 if(signedJWT != null) {
+			 String username =signedJWT.getJWTClaimsSet().getSubject();
+			 LoginCredential loginCredential =new LoginCredential(username,"",ConstantsLoginType.JWT);
+			 authenticationProvider.authentication(loginCredential,true);
+			 _logger.debug("JWT Logined in , username " + username);
+		 }
+		
+		return true;
+	}
+
+	 public HttpJwtEntryPoint() {
+	        super();
+	 }
+
+    public HttpJwtEntryPoint (boolean enable) {
+        super();
+        this.enable = enable;
+    }
+
+    public HttpJwtEntryPoint(AbstractAuthenticationProvider authenticationProvider, JwtLoginService jwtLoginService,
+			ApplicationConfig applicationConfig, boolean enable) {
+		super();
+		this.authenticationProvider = authenticationProvider;
+		this.jwtLoginService = jwtLoginService;
+		this.applicationConfig = applicationConfig;
+		this.enable = enable;
+	}
+
+	public boolean isEnable() {
+        return enable;
+    }
+
+    public void setEnable(boolean enable) {
+        this.enable = enable;
+    }
+
+	public void setApplicationConfig(ApplicationConfig applicationConfig) {
+		this.applicationConfig = applicationConfig;
+	}
+
+	public void setAuthenticationProvider(AbstractAuthenticationProvider authenticationProvider) {
+		this.authenticationProvider = authenticationProvider;
+	}
+
+	public void setJwtLoginService(JwtLoginService jwtLoginService) {
+		this.jwtLoginService = jwtLoginService;
+	}
+	
+}

+ 134 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/jwt/JwtLoginService.java

@@ -0,0 +1,134 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.jwt;
+
+import com.nimbusds.jose.JOSEException;
+import com.nimbusds.jose.JWSAlgorithm;
+import com.nimbusds.jose.JWSHeader;
+import com.nimbusds.jose.crypto.RSASSAVerifier;
+import com.nimbusds.jose.jwk.RSAKey;
+import com.nimbusds.jwt.JWT;
+import com.nimbusds.jwt.JWTClaimsSet;
+import com.nimbusds.jwt.PlainJWT;
+import com.nimbusds.jwt.SignedJWT;
+import java.util.Date;
+import java.util.UUID;
+import org.joda.time.DateTime;
+import org.maxkey.crypto.jwt.signer.service.impl.DefaultJwtSigningAndValidationService;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class JwtLoginService {
+    private static final Logger _logger = LoggerFactory.getLogger(JwtLoginService.class);
+
+    String issuer;
+    
+    DefaultJwtSigningAndValidationService jwtSignerValidationService;
+    
+    public JwtLoginService(
+            DefaultJwtSigningAndValidationService jwtSignerValidationService,
+            String issuer
+            ) {
+        this.jwtSignerValidationService = jwtSignerValidationService;
+        this.issuer = issuer;
+    }
+
+    public String buildLoginJwt() {
+        _logger.debug("build Login JWT .");
+
+        DateTime currentDateTime = DateTime.now();
+        Date expirationTime = currentDateTime.plusMinutes(10).toDate();
+        _logger.debug("Expiration Time : " + expirationTime);
+        JWTClaimsSet jwtClaims = new JWTClaimsSet.Builder().subject(WebContext.getSession().getId())
+                .expirationTime(expirationTime).issuer(getIssuer())
+                .issueTime(currentDateTime.toDate()).jwtID(UUID.randomUUID().toString()).build();
+
+        JWT jwtToken = new PlainJWT(jwtClaims);
+
+        _logger.info("JWT Claims : " + jwtClaims.toString());
+
+        JWSAlgorithm signingAlg = jwtSignerValidationService.getDefaultSigningAlgorithm();
+
+        jwtToken = new SignedJWT(new JWSHeader(signingAlg), jwtClaims);
+        // sign it with the server's key
+        jwtSignerValidationService.signJwt((SignedJWT) jwtToken);
+
+        String tokenString = jwtToken.serialize();
+        _logger.debug("JWT Token : " + tokenString);
+        return tokenString;
+    }
+
+    public SignedJWT jwtTokenValidation(String jwt) {
+        SignedJWT signedJWT = null;
+        JWTClaimsSet jwtClaimsSet = null;
+        try {
+            RSASSAVerifier rsaSSAVerifier = 
+                    new RSASSAVerifier(((RSAKey) jwtSignerValidationService.getAllPublicKeys()
+                            .get(jwtSignerValidationService.getDefaultSignerKeyId())).toRSAPublicKey());
+
+            signedJWT = SignedJWT.parse(jwt);
+            
+            if (signedJWT.verify(rsaSSAVerifier)) {
+            	 jwtClaimsSet = signedJWT.getJWTClaimsSet();
+            	 boolean isIssuerMatches = jwtClaimsSet.getIssuer().equals(getIssuer());
+            	 boolean isExpiration = (new DateTime()).isBefore(
+            	             jwtClaimsSet.getExpirationTime().getTime());
+            	 
+                 _logger.debug("Signed JWT {}" , signedJWT.getPayload());
+                 _logger.debug("Subject is {}" , jwtClaimsSet.getSubject());
+                 _logger.debug("ExpirationTime  Validation {}" ,isExpiration);
+                 _logger.debug("JWT ClaimsSet Issuer {}, Metadata Issuer {}, Issuer is matches {}" ,
+                                jwtClaimsSet.getIssuer(), getIssuer(), isIssuerMatches
+                        );
+
+                 if ( isIssuerMatches && isExpiration ) {
+                    return signedJWT;
+                 }
+            }else { 
+                _logger.debug("JWT Signer Verify false.");
+            }
+        } catch (java.text.ParseException e) {
+            // Invalid signed JWT encoding
+            _logger.error("Invalid signed JWT encoding ",e);
+        } catch (JOSEException e) {
+            _logger.error("JOSEException ",e);
+        }
+        return null;
+    }
+
+    public void setJwtSignerValidationService(DefaultJwtSigningAndValidationService jwtSignerValidationService) {
+        this.jwtSignerValidationService = jwtSignerValidationService;
+    }
+
+	public DefaultJwtSigningAndValidationService getJwtSignerValidationService() {
+		return jwtSignerValidationService;
+	}
+
+    public String getIssuer() {
+        return issuer;
+    }
+
+    public void setIssuer(String issuer) {
+        this.issuer = issuer;
+    }
+    
+    
+
+}

+ 143 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/HttpKerberosEntryPoint.java

@@ -0,0 +1,143 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.kerberos;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.joda.time.DateTime;
+import org.maxkey.authn.AbstractAuthenticationProvider;
+import org.maxkey.authn.LoginCredential;
+import org.maxkey.configuration.ApplicationConfig;
+import org.maxkey.constants.ConstantsLoginType;
+import org.maxkey.crypto.ReciprocalUtils;
+import org.maxkey.util.DateUtils;
+import org.maxkey.util.JsonUtils;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.servlet.AsyncHandlerInterceptor;
+
+
+public class HttpKerberosEntryPoint implements AsyncHandlerInterceptor {
+	private static final Logger _logger = LoggerFactory.getLogger(HttpKerberosEntryPoint.class);
+	
+    boolean enable;
+    
+  	ApplicationConfig applicationConfig;
+    
+    AbstractAuthenticationProvider authenticationProvider ;
+    
+	KerberosService kerberosService;
+	
+	 @Override
+	 public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
+		 boolean isAuthenticated= WebContext.isAuthenticated();
+		 String kerberosTokenString = request.getParameter(WebConstants.KERBEROS_TOKEN_PARAMETER);
+		 String kerberosUserDomain = request.getParameter(WebConstants.KERBEROS_USERDOMAIN_PARAMETER);
+		 
+		 if(!enable 
+				 || isAuthenticated 
+				 || kerberosTokenString == null){
+			 return true;
+		 }
+		 
+		 _logger.trace("Kerberos Login Start ...");
+		 _logger.trace("Request url : "+ request.getRequestURL());
+		 _logger.trace("Request URI : "+ request.getRequestURI());
+		 _logger.trace("Request ContextPath : "+ request.getContextPath());
+		 _logger.trace("Request ServletPath : "+ request.getServletPath());
+		 _logger.trace("RequestSessionId : "+ request.getRequestedSessionId());
+		 _logger.trace("isRequestedSessionIdValid : "+ request.isRequestedSessionIdValid());
+		 _logger.trace("getSession : "+ request.getSession(false));
+		 
+		// session not exists,session timeout,recreate new session
+		 if(request.getSession(false) == null) {
+		    _logger.trace("recreate new session .");
+			request.getSession(true);
+		 }
+		 
+		 _logger.trace("getSession.getId : "+ request.getSession().getId());
+
+		//for Kerberos Login
+		_logger.debug("Try Kerberos login ");
+		_logger.debug("encoder Kerberos Token "+kerberosTokenString);
+		_logger.debug("kerberos UserDomain "+kerberosUserDomain);
+		
+		String decoderKerberosToken=null;
+		for(KerberosProxy kerberosProxy : kerberosService.getKerberosProxys()){
+			if(kerberosProxy.getUserdomain().equalsIgnoreCase(kerberosUserDomain)){
+				decoderKerberosToken=ReciprocalUtils.aesDecoder(kerberosTokenString, kerberosProxy.getCrypto());
+				break;
+			}
+		}
+		_logger.debug("decoder Kerberos Token "+decoderKerberosToken);
+		KerberosToken  kerberosToken=new KerberosToken();
+		kerberosToken=(KerberosToken)JsonUtils.json2Object(decoderKerberosToken, kerberosToken);
+		_logger.debug("Kerberos Token "+kerberosToken);
+		
+		DateTime notOnOrAfter=DateUtils.toUtcDate(kerberosToken.getNotOnOrAfter());
+		_logger.debug("Kerberos Token is After Now  "+notOnOrAfter.isAfterNow());
+		
+		if(notOnOrAfter.isAfterNow()){
+		    LoginCredential loginCredential =new LoginCredential(kerberosToken.getPrincipal(),"",ConstantsLoginType.KERBEROS);
+		    loginCredential.setProvider(kerberosUserDomain);
+            authenticationProvider.authentication(loginCredential,true);
+	    	_logger.debug("Kerberos Logined in , username " + kerberosToken.getPrincipal());
+		}
+		
+		return true;
+	}
+
+	 public HttpKerberosEntryPoint() {
+	        super();
+	 }
+
+    public HttpKerberosEntryPoint (boolean enable) {
+        super();
+        this.enable = enable;
+    }
+
+    public HttpKerberosEntryPoint(AbstractAuthenticationProvider authenticationProvider, KerberosService kerberosService,
+			ApplicationConfig applicationConfig, boolean enable) {
+		super();
+		this.authenticationProvider = authenticationProvider;
+		this.kerberosService = kerberosService;
+		this.applicationConfig = applicationConfig;
+		this.enable = enable;
+	}
+
+	public boolean isEnable() {
+        return enable;
+    }
+
+    public void setEnable(boolean enable) {
+        this.enable = enable;
+    }
+
+	public void setApplicationConfig(ApplicationConfig applicationConfig) {
+		this.applicationConfig = applicationConfig;
+	}
+
+	public void setAuthenticationProvider(AbstractAuthenticationProvider authenticationProvider) {
+		this.authenticationProvider = authenticationProvider;
+	}
+
+
+	
+}

+ 80 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/KerberosProxy.java

@@ -0,0 +1,80 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.kerberos;
+
+public class KerberosProxy {
+	
+	String userdomain;
+	
+	String fullUserdomain;
+	
+	String crypto;
+	
+	String redirectUri;
+
+	
+	/**
+	 * 
+	 */
+	public KerberosProxy() {
+		super();
+	}
+
+	public String getUserdomain() {
+		return userdomain;
+	}
+
+	public void setUserdomain(String userdomain) {
+		this.userdomain = userdomain.toUpperCase();
+	}
+
+	public String getFullUserdomain() {
+		return fullUserdomain;
+	}
+
+	public void setFullUserdomain(String fullUserdomain) {
+		this.fullUserdomain = fullUserdomain.toUpperCase();
+	}
+
+
+
+	public String getCrypto() {
+		return crypto;
+	}
+
+	public void setCrypto(String crypto) {
+		this.crypto = crypto;
+	}
+
+	public String getRedirectUri() {
+		return redirectUri;
+	}
+
+	public void setRedirectUri(String redirectUri) {
+		this.redirectUri = redirectUri;
+	}
+
+	@Override
+	public String toString() {
+		return "KerberosProxy [userdomain=" + userdomain + ", fullUserdomain="
+				+ fullUserdomain + ", crypto=" + crypto
+				+ ", redirectUri=" + redirectUri + "]";
+	}
+	
+	
+}

+ 28 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/KerberosService.java

@@ -0,0 +1,28 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.kerberos;
+
+import java.util.List;
+
+public interface KerberosService {
+	
+	public List<KerberosProxy> getKerberosProxys();
+	
+	public  String buildKerberosProxys( );
+	
+}

+ 77 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/KerberosToken.java

@@ -0,0 +1,77 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.kerberos;
+
+
+public class KerberosToken {
+
+	private String principal;
+	
+	private String fullPrincipal;
+	
+	private String notOnOrAfter;
+	
+	private String userDomain;
+
+	/**
+	 * 
+	 */
+	public KerberosToken() {
+		super();
+	}
+
+	public String getPrincipal() {
+		return principal;
+	}
+
+	public void setPrincipal(String principal) {
+		this.principal = principal;
+	}
+
+	public String getFullPrincipal() {
+		return fullPrincipal;
+	}
+
+	public void setFullPrincipal(String fullPrincipal) {
+		this.fullPrincipal = fullPrincipal;
+	}
+	
+	public String getNotOnOrAfter() {
+		return notOnOrAfter;
+	}
+
+	public void setNotOnOrAfter(String notOnOrAfter) {
+		this.notOnOrAfter = notOnOrAfter;
+	}
+
+	public String getUserDomain() {
+		return userDomain;
+	}
+
+	public void setUserDomain(String userDomain) {
+		this.userDomain = userDomain;
+	}
+
+	@Override
+	public String toString() {
+		return "KerberosToken [principal=" + principal + ", fullPrincipal="
+				+ fullPrincipal + ", notOnOrAfter=" + notOnOrAfter
+				+ ", userDomain=" + userDomain + "]";
+	}
+
+}

+ 53 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/RemoteKerberosService.java

@@ -0,0 +1,53 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.kerberos;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.maxkey.util.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RemoteKerberosService  implements KerberosService{
+	private static Logger _logger = LoggerFactory.getLogger(RemoteKerberosService.class);
+	List<KerberosProxy> kerberosProxys;
+
+	public List<KerberosProxy> getKerberosProxys() {
+		return kerberosProxys;
+	}
+
+	public void setKerberosProxys(List<KerberosProxy> kerberosProxys) {
+		this.kerberosProxys = kerberosProxys;
+	}
+	
+	public  String buildKerberosProxys(){
+		List<Map<String,String>>userDomainUrlList=new ArrayList<Map<String,String>>();
+		for (KerberosProxy kerberosProxy :kerberosProxys){
+			Map<String,String> userDomainUrl =new HashMap<String,String>();
+			userDomainUrl.put("userDomain", kerberosProxy.getUserdomain());
+			userDomainUrl.put("redirectUri", kerberosProxy.getRedirectUri());
+			userDomainUrlList.add(userDomainUrl);
+		}
+		_logger.debug(""+userDomainUrlList);
+		String userDomainUrlJson=JsonUtils.object2Json(userDomainUrlList);
+		_logger.debug("userDomain Url Json "+userDomainUrlJson);
+		return userDomainUrlJson;
+	}
+}

+ 166 - 0
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/rememberme/AbstractRemeberMeService.java

@@ -0,0 +1,166 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed 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.maxkey.authn.support.rememberme;
+
+import java.util.Date;
+import java.util.regex.Pattern;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.maxkey.configuration.ApplicationConfig;
+import org.maxkey.constants.ConstantsTimeInterval;
+import org.maxkey.crypto.Base64Utils;
+import org.maxkey.crypto.ReciprocalUtils;
+import org.maxkey.util.JsonUtils;
+import org.maxkey.web.WebConstants;
+import org.maxkey.web.WebContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+
+public abstract class AbstractRemeberMeService {
+    private static final Logger _logger = LoggerFactory.getLogger(AbstractRemeberMeService.class);
+
+    protected Integer remeberMeValidity = ConstantsTimeInterval.TWO_WEEK;
+
+    protected String validity;
+
+    @Autowired
+    @Qualifier("applicationConfig")
+    protected ApplicationConfig applicationConfig;
+
+    // follow function is for persist
+    public abstract void save(RemeberMe remeberMe);
+
+    public abstract void update(RemeberMe remeberMe);
+
+    public abstract RemeberMe read(RemeberMe remeberMe);
+
+    public abstract void remove(String username);
+    // end persist
+
+    public boolean createRemeberMe(String username, HttpServletRequest request, HttpServletResponse response) {
+        if (request.getSession().getAttribute(WebConstants.REMEBER_ME_SESSION) != null
+                && applicationConfig.getLoginConfig().isRemeberMe()) {
+            _logger.debug("Remeber Me ...");
+            RemeberMe remeberMe = new RemeberMe();
+            remeberMe.setAuthKey(WebContext.genId());
+            remeberMe.setId(WebContext.genId());
+            remeberMe.setUsername(WebContext.getUserInfo().getUsername());
+            remeberMe.setLastLogin(new Date());
+            save(remeberMe);
+            _logger.debug("Remeber Me " + remeberMe);
+            _logger.debug("Cookie Name : " + WebConstants.REMEBER_ME_COOKIE);
+
+            String jsonRemeberMe = JsonUtils.object2Json(remeberMe);
+            _logger.debug("Remeber Me JSON " + jsonRemeberMe);
+
+            jsonRemeberMe = ReciprocalUtils.encode(jsonRemeberMe);
+
+            String cookieValue = Base64Utils.base64UrlEncode(jsonRemeberMe.getBytes());
+
+            _logger.debug("Remeber Me JSON " + cookieValue);
+            Cookie cookie = new Cookie(WebConstants.REMEBER_ME_COOKIE, cookieValue);
+
+            Integer maxAge = getRemeberMeValidity();
+            _logger.debug("Cookie Max Age :" + maxAge + " seconds.");
+            cookie.setMaxAge(maxAge);
+
+            // cookie.setPath("/");
+            cookie.setDomain(applicationConfig.getDomainName());
+            response.addCookie(cookie);
+            request.getSession().removeAttribute(WebConstants.REMEBER_ME_SESSION);
+        }
+        return true;
+    }
+
+    public boolean updateRemeberMe(RemeberMe remeberMe, HttpServletResponse response) {
+        remeberMe.setAuthKey(WebContext.genId());
+        remeberMe.setLastLogin(new Date());
+        update(remeberMe);
+        _logger.debug("update Remeber Me " + remeberMe);
+        _logger.debug("Cookie Name : " + WebConstants.REMEBER_ME_COOKIE);
+
+        String jsonRemeberMe = JsonUtils.object2Json(remeberMe);
+        _logger.debug("Remeber Me JSON " + jsonRemeberMe);
+
+        _logger.debug("Encode Remeber Me JSON ...");
+        jsonRemeberMe = ReciprocalUtils.encode(jsonRemeberMe);
+        _logger.debug("Encode Remeber Me JSON " + jsonRemeberMe);
+
+        String cookieValue = Base64Utils.base64UrlEncode(jsonRemeberMe.getBytes());
+
+        Cookie cookie = new Cookie(WebConstants.REMEBER_ME_COOKIE, cookieValue);
+
+        Integer maxAge = getRemeberMeValidity();
+        _logger.debug("Cookie Max Age :" + maxAge + " seconds.");
+        cookie.setMaxAge(maxAge);
+
+        // cookie.setPath("/");
+        cookie.setDomain(applicationConfig.getDomainName());
+        response.addCookie(cookie);
+        return true;
+    }
+
+    public boolean removeRemeberMe(HttpServletResponse response) {
+        Cookie cookie = new Cookie(WebConstants.REMEBER_ME_COOKIE, null);
+        cookie.setMaxAge(0);
+
+        cookie.setDomain(applicationConfig.getDomainName());
+        response.addCookie(cookie);
+
+        remove(WebContext.getUserInfo().getUsername());
+
+        return true;
+    }
+
+    public Integer getRemeberMeValidity() {
+        return remeberMeValidity;
+    }
+
+    public void setRemeberMeValidity(Integer remeberMeValidity) {
+        this.remeberMeValidity = remeberMeValidity;
+    }
+
+    public String getValidity() {
+        return validity;
+    }
+
+    public void setApplicationConfig(ApplicationConfig applicationConfig) {
+        this.applicationConfig = applicationConfig;
+    }
+
+    public void setValidity(String validity) {
+        _logger.debug("validity : " + validity);
+        this.validity = validity;
+        if (Pattern.matches("[0-9]+", validity)) {
+            remeberMeValidity = Integer.parseInt(validity);
+        } else if (validity.equalsIgnoreCase("ONE_DAY")) {
+            remeberMeValidity = ConstantsTimeInterval.ONE_DAY;
+        } else if (validity.equalsIgnoreCase("ONE_WEEK")) {
+            remeberMeValidity = ConstantsTimeInterval.ONE_WEEK;
+        } else if (validity.equalsIgnoreCase("TWO_WEEK")) {
+            remeberMeValidity = ConstantsTimeInterval.TWO_WEEK;
+        } else if (validity.equalsIgnoreCase("ONE_YEAR")) {
+            remeberMeValidity = ConstantsTimeInterval.ONE_YEAR;
+        }
+
+        _logger.debug("Remeber Me Validity : " + remeberMeValidity);
+    }
+}

Some files were not shown because too many files changed in this diff