You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ni...@apache.org on 2022/04/29 04:55:00 UTC

[ranger] branch master updated: RANGER-3389 : Swagger UI Support for Ranger REST API.

This is an automated email from the ASF dual-hosted git repository.

ni3galave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 26caf7067 RANGER-3389 : Swagger UI Support for Ranger REST API.
26caf7067 is described below

commit 26caf7067df9155b3cf37428c9b7278ab2b57755
Author: Dhaval.Rajpara <dh...@gmail.com>
AuthorDate: Mon Apr 4 14:25:38 2022 +0530

    RANGER-3389 : Swagger UI Support for Ranger REST API.
    
    Signed-off-by: Nitin Galave <ni...@apache.org>
---
 distro/src/main/assembly/admin-web.xml             | 18 ++++++
 docs/src/site/resources/index.html                 | 53 ++++++++++++++++
 docs/src/site/resources/index.js                   | 74 ++++++++++++++++++++++
 docs/src/site/resources/swagger-ui-bundle.js       | 19 ++++++
 .../site/resources/swagger-ui-es-bundle-core.js    | 19 ++++++
 docs/src/site/resources/swagger-ui-es-bundle.js    | 19 ++++++
 .../site/resources/swagger-ui-standalone-preset.js | 19 ++++++
 docs/src/site/resources/swagger-ui.css             | 21 ++++++
 docs/src/site/resources/swagger-ui.js              | 19 ++++++
 enunciate.xml                                      |  2 +-
 pom.xml                                            |  5 +-
 .../src/main/webapp/scripts/modules/RestCsrf.js    |  1 +
 .../webapp/templates/common/ProfileBar_tmpl.html   |  1 +
 13 files changed, 267 insertions(+), 3 deletions(-)

diff --git a/distro/src/main/assembly/admin-web.xml b/distro/src/main/assembly/admin-web.xml
index e19d50572..15f462c51 100644
--- a/distro/src/main/assembly/admin-web.xml
+++ b/distro/src/main/assembly/admin-web.xml
@@ -585,6 +585,24 @@
       </includes>
     </fileSet>
 
+    <fileSet>
+      <outputDirectory>ews/webapp/apidocs</outputDirectory>
+      <directory>${project.parent.basedir}/docs/target/apidocs/ui</directory>
+      <excludes>
+        <exclude>index.html</exclude>
+      </excludes>
+      <includes>
+        <include>swagger.json</include>
+      </includes>
+      <fileMode>544</fileMode>
+    </fileSet>
+
+    <fileSet>
+      <outputDirectory>ews/webapp/apidocs</outputDirectory>
+      <directory>${project.parent.basedir}/docs/src/site/resources</directory>
+      <fileMode>544</fileMode>
+    </fileSet>
+
     <fileSet>
       <outputDirectory></outputDirectory>
       <directory>${project.parent.basedir}/security-admin</directory>
diff --git a/docs/src/site/resources/index.html b/docs/src/site/resources/index.html
new file mode 100644
index 000000000..726b8d8f5
--- /dev/null
+++ b/docs/src/site/resources/index.html
@@ -0,0 +1,53 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <title>Swagger UI</title>
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
+    <link rel="icon" type="image/png" href="./images/folder-grey.png"  />
+    <style>
+      html
+      {
+        box-sizing: border-box;
+        overflow: -moz-scrollbars-vertical;
+        overflow-y: scroll;
+      }
+
+      *,
+      *:before,
+      *:after
+      {
+        box-sizing: inherit;
+      }
+
+      body
+      {
+        margin:0;
+        background: #fafafa;
+      }
+    </style>
+  </head>
+
+  <body>
+    <div id="swagger-ui"></div>
+    <script src="./index.js"></script>
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
+  </body>
+</html>
diff --git a/docs/src/site/resources/index.js b/docs/src/site/resources/index.js
new file mode 100644
index 000000000..bb876f28d
--- /dev/null
+++ b/docs/src/site/resources/index.js
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var gatewayUrl;
+var apiBaseUrl = "/service";
+
+window.onload = function() {
+    const ui = SwaggerUIBundle({
+        url: getSwaggerBaseUrl(window.location.pathname) + "/swagger.json",
+        dom_id: '#swagger-ui',
+        deepLinking: true,
+        presets: [
+            SwaggerUIBundle.presets.apis,
+            SwaggerUIStandalonePreset
+        ],
+        plugins: [
+            SwaggerUIBundle.plugins.DownloadUrl
+        ],
+        layout: "StandaloneLayout",
+        requestInterceptor: function(request) {
+              if (!request.url.includes("swagger.json")) {
+                    request.url = getAPIUrl(request.url);
+              }
+              if (request.method != "GET") {
+                request.headers['X-XSRF-HEADER'] = localStorage.csrfToken;
+              }
+
+              return request;
+        },
+        docExpansion: 'none'
+    })
+    window.ui = ui;
+    setLogo()
+    if(document.getElementById("swagger-ui").getElementsByClassName("float-right").length > 0) {
+        document.getElementById("swagger-ui").getElementsByClassName("float-right")[0].querySelector("a").remove()
+    }
+
+}
+
+function setLogo() {
+    if( document.getElementById("swagger-ui").getElementsByClassName("topbar-wrapper").length > 0){
+        document.getElementById("swagger-ui").getElementsByClassName("topbar-wrapper")[0].getElementsByTagName("img")[0].src = gatewayUrl + "/images/ranger_logo.png";
+    }
+}
+
+function getSwaggerBaseUrl(url) {
+    var path = url.replace(/\/[\w-]+.(jsp|html)|\/+$/ig, '');
+    splitPath = path.split("/");
+    splitPath.pop();
+    gatewayUrl = splitPath.join("/");
+
+    return window.location.origin + path;
+};
+
+function getAPIUrl(url) {
+    url = new URL(url);
+    var path =  url.origin + apiBaseUrl + url.pathname + url.search;
+    return path;
+};
diff --git a/docs/src/site/resources/swagger-ui-bundle.js b/docs/src/site/resources/swagger-ui-bundle.js
new file mode 100644
index 000000000..89bf4a9b3
--- /dev/null
+++ b/docs/src/site/resources/swagger-ui-bundle.js
@@ -0,0 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exp [...]
᠎"!="​…᠎"[e]()||o[e].name!==e}))}},function(e,t,n){var r=n(93),o=n(291);e.exports=function(e){return o(r(e).toLowerCase())}},function(e,t,n){var r=n(135),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(698),o=n(417),a=n(699),i [...]
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function w(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var x=new Array(256),E=new Array(256),S=0;S<256;S++)x[S]=_(S)?1:0,E[S]=_(S);function C(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typ [...]
\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){n=" ... ",o+=5;break}for(a="",i=this.position;i<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i));)if((i+=1)-this.position>t/2-1){a=" ... ",i-=5;break}return s=this.buffer.slice(o,i),r.repeat(" ",e)+n+s+a+"\n"+r.repeat(" ",e+this.position-o+n.length)+"^"},o.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=o},function(e,t,n){"use strict";var r=n(48);e.exports=new r("tag:yaml.org,2002:str",{kind:"sc [...]
+//# sourceMappingURL=swagger-ui-bundle.js.map
\ No newline at end of file
diff --git a/docs/src/site/resources/swagger-ui-es-bundle-core.js b/docs/src/site/resources/swagger-ui-es-bundle-core.js
new file mode 100644
index 000000000..cf16c6a88
--- /dev/null
+++ b/docs/src/site/resources/swagger-ui-es-bundle-core.js
@@ -0,0 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e; [...]
᠎"!="​…᠎"[e]()||a[e].name!==e}))}},function(e,t,n){var r=n(76),a=n(216);e.exports=function(e){return a(r(e).toLowerCase())}},function(e,t,n){var r=n(109),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[s]=n:delete e[s]),a}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(542),a=n(331),o=n(543),i [...]
+//# sourceMappingURL=swagger-ui-es-bundle-core.js.map
\ No newline at end of file
diff --git a/docs/src/site/resources/swagger-ui-es-bundle.js b/docs/src/site/resources/swagger-ui-es-bundle.js
new file mode 100644
index 000000000..328d693f6
--- /dev/null
+++ b/docs/src/site/resources/swagger-ui-es-bundle.js
@@ -0,0 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e; [...]
᠎"!="​…᠎"[e]()||o[e].name!==e}))}},function(e,t,n){var r=n(93),o=n(291);e.exports=function(e){return o(r(e).toLowerCase())}},function(e,t,n){var r=n(135),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(698),o=n(417),a=n(699),i [...]
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function w(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var x=new Array(256),E=new Array(256),S=0;S<256;S++)x[S]=_(S)?1:0,E[S]=_(S);function C(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typ [...]
\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){n=" ... ",o+=5;break}for(a="",i=this.position;i<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i));)if((i+=1)-this.position>t/2-1){a=" ... ",i-=5;break}return s=this.buffer.slice(o,i),r.repeat(" ",e)+n+s+a+"\n"+r.repeat(" ",e+this.position-o+n.length)+"^"},o.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=o},function(e,t,n){"use strict";var r=n(48);e.exports=new r("tag:yaml.org,2002:str",{kind:"sc [...]
+//# sourceMappingURL=swagger-ui-es-bundle.js.map
\ No newline at end of file
diff --git a/docs/src/site/resources/swagger-ui-standalone-preset.js b/docs/src/site/resources/swagger-ui-standalone-preset.js
new file mode 100644
index 000000000..39df72f59
--- /dev/null
+++ b/docs/src/site/resources/swagger-ui-standalone-preset.js
@@ -0,0 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("esprima")}catch(t){}}()):"function"==typeof define&&define.amd?define(["esprima"],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e(function(){try{return require("esprima")}catch(t){}}()):t.SwaggerUIStandalonePreset=e(t.esprima)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].ca [...]
᠎"!="​…᠎"[t]()||i[t].name!==t}))}},function(t,e,n){var r=n(67),i=n(148);t.exports=function(t){return i(r(t).toLowerCase())}},function(t,e,n){var r=n(93),i=n(429),o=n(23),u=n(94),s=r?r.prototype:void 0,a=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(u(e))return a?a.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}}, [...]
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function _(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var L=new Array(256),x=new Array(256),b=0;b<256;b++)L[b]=m(b)?1:0,x[b]=m(b);function j(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||s,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typ [...]
\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",u=this.position;u<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(u));)if((u+=1)-this.position>e/2-1){o=" ... ",u-=5;break}return s=this.buffer.slice(i,u),r.repeat(" ",t)+n+s+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet())&&(n+=":\n"+e),n},t.exports=i},function(t,e,n){"use strict";var r=n(7);t.exports=new r("tag:yaml.org,2002:str",{kind:"sca [...]
+//# sourceMappingURL=swagger-ui-standalone-preset.js.map
\ No newline at end of file
diff --git a/docs/src/site/resources/swagger-ui.css b/docs/src/site/resources/swagger-ui.css
new file mode 100644
index 000000000..267c5e141
--- /dev/null
+++ b/docs/src/site/resources/swagger-ui.css
@@ -0,0 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ .swagger-ui{color:#3b4151;
+  /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */font-family:sans-serif}.swagger-ui html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.15}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40 [...]
+
+/*# sourceMappingURL=swagger-ui.css.map*/
\ No newline at end of file
diff --git a/docs/src/site/resources/swagger-ui.js b/docs/src/site/resources/swagger-ui.js
new file mode 100644
index 000000000..3a4f99719
--- /dev/null
+++ b/docs/src/site/resources/swagger-ui.js
@@ -0,0 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUICore=t():e.SwaggerUICore=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=fun [...]
᠎"!="​…᠎"[e]()||a[e].name!==e}))}},function(e,t,n){var r=n(76),a=n(216);e.exports=function(e){return a(r(e).toLowerCase())}},function(e,t,n){var r=n(109),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[s]=n:delete e[s]),a}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(542),a=n(331),o=n(543),i [...]
+//# sourceMappingURL=swagger-ui.js.map
\ No newline at end of file
diff --git a/enunciate.xml b/enunciate.xml
index 13b465b55..47575ec71 100644
--- a/enunciate.xml
+++ b/enunciate.xml
@@ -16,7 +16,7 @@
   ~ limitations under the License.
   -->
 <enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.8.0.xsd" >
+           xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.13.0.xsd" >
 	<title>Ranger REST API</title>
 	<description> Apache Ranger is a framework to enable, monitor and manage comprehensive data security across the Hadoop platform. Apache Ranger currently provides a centralized security adminstration, fine grain access control and detailed auditing for user access within Apache Hadoop, Apache Hive, Apache HBase and other Apache components</description>
 	<modules>
diff --git a/pom.xml b/pom.xml
index 52f493e8f..ec8c6751d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,8 @@
   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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache</groupId>
@@ -112,7 +113,7 @@
         <derby.version>10.11.1.1</derby.version>
         <eclipse.jpa.version>2.5.2</eclipse.jpa.version>
         <elasticsearch.version>7.6.0</elasticsearch.version>
-        <enunciate.version>2.11.1</enunciate.version>
+        <enunciate.version>2.13.2</enunciate.version>
         <spotbugs.plugin.version>4.5.0.0</spotbugs.plugin.version>
         <google.guava.version>27.0-jre</google.guava.version>
         <googlecode.log4jdbc.version>1.2</googlecode.log4jdbc.version>
diff --git a/security-admin/src/main/webapp/scripts/modules/RestCsrf.js b/security-admin/src/main/webapp/scripts/modules/RestCsrf.js
index 63561e3d1..3a0460f2a 100644
--- a/security-admin/src/main/webapp/scripts/modules/RestCsrf.js
+++ b/security-admin/src/main/webapp/scripts/modules/RestCsrf.js
@@ -86,6 +86,7 @@ define(function(require) {
         restCsrfCustomHeader = header;
         restCsrfMethodsToIgnore = {};
         restCsrfToken = headerToken;
+        localStorage.setItem("csrfToken" , headerToken)
         methods.map(function(method) { restCsrfMethodsToIgnore[method] = true; });
         $.ajaxSetup({
           beforeSend: addRestCsrfCustomHeader
diff --git a/security-admin/src/main/webapp/templates/common/ProfileBar_tmpl.html b/security-admin/src/main/webapp/templates/common/ProfileBar_tmpl.html
index 285d10617..049f472d0 100644
--- a/security-admin/src/main/webapp/templates/common/ProfileBar_tmpl.html
+++ b/security-admin/src/main/webapp/templates/common/ProfileBar_tmpl.html
@@ -22,6 +22,7 @@
             </a>
             <div class="dropdown-menu dropdown-menu-right">
                 <a class="dropdown-item" href="#!/userprofile"><i class="fa fa-user m-r-xs"></i> Profile </a>
+                <a class="dropdown-item" href="../../apidocs/index.html" target='_blank'><i class="fa fa-user m-r-xs"></i> API Documentation </a>
                 <a class="dropdown-item" href="javascript:;" class="_allowNav" data-id="logout"><i class="fa fa-power-off m-r-xs"></i> Log Out </a>
                 {{#if oldUi}}
                     <a class="dropdown-item" href="javascript:;" data-id="oldNewSwitch" data-value="true">