knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject [03/11] knox git commit: KNOX-686 - Default Form based SSO IDP as an Application
Date Thu, 10 Mar 2016 17:34:42 GMT
http://git-wip-us.apache.org/repos/asf/knox/blob/3e36bc69/gateway-applications/src/main/resources/applications/knoxauth/login.html
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/knoxauth/login.html b/gateway-applications/src/main/resources/applications/knoxauth/login.html
new file mode 100644
index 0000000..08e4d67
--- /dev/null
+++ b/gateway-applications/src/main/resources/applications/knoxauth/login.html
@@ -0,0 +1,82 @@
+<!--
+  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>
+<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
+<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
+<!--[if IE 8]><html class="no-js lt-ie9"><![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+	<!--<![endif]-->
+	<head>
+		<meta charset="utf-8">
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+		<title>KnoxSSO - Sign In</title>
+		<meta name="description" content="">
+		<meta name="viewport" content="width=device-width">
+		
+		<link rel="shortcut icon" href="images/favicon.ico">
+		<link href="styles/bootstrap.min.css" media="all" rel="stylesheet" type="text/css" id="bootstrap-css">
+		<link href="styles/knox.css" media="all" rel="stylesheet" type="text/css" >
+
+		<script src="libs/bower/jquery/js/jquery.js" ></script>
+    <script type="text/javascript" src="js/knoxauth.js"></script>
+    
+		<script type="text/javascript">
+			$(document).ready(function() {
+				var updateBoxPosition = function() {
+					$('#signin-container').css({
+						'margin-top' : ($(window).height() - $('#signin-container').height()) / 2
+					});
+				};
+				$(window).resize(updateBoxPosition);
+				setTimeout(updateBoxPosition, 50);
+			});
+		</script>
+
+	</head>
+	<body class="login" style="">
+		<!--%
+			response.setHeader("X-Frame-Options", "DENY");
+		%-->
+		<!-- Page content
+		================================================== -->
+		<section id="signin-container" style="margin-top: 4.5px;">
+			<div class="l-logo">
+				<img src="images/knox-logo.gif" alt="Knox logo">
+			</div>
+			<form action="" method="post" accept-charset="utf-8">
+				<fieldset>
+					<div class="fields">
+						<label><i class="icon-user"></i> Username:</label>
+						<input type="text" name="username" id="username" tabindex="1" autofocus>
+						<label><i class="icon-lock"></i> Password:</label>	
+						<input type="password" name="password" id="password" tabindex="2" autocomplete="off">
+					</div>
+					<span id="errorBox" class="help-inline" style="color:white;display:none;"><span
class="errorMsg"></span>
+						<i class="icon-warning-sign" style="color:#ae2817;"></i>
+					</span>
+					<span id="errorBoxUnsynced" class="help-inline" style="color:white;display:none;">User
is not available in HDP Admin Tool. Please contact your Administrator.
+						<i class="icon-warning-sign" style="color:#ae2817;"></i>
+					</span>
+					<button type="button" class="btn btn-primary btn-block" id="signIn" tabindex="4"
onkeypress="return login()" onclick="login();">
+						Sign In
+						<i id="signInLoading" class="icon-spinner icon-spin pull-right icon-sign-in"></i>
+					</button>
+				</fieldset>
+			</form>
+		</section>
+
+	</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/3e36bc69/gateway-applications/src/main/resources/applications/knoxauth/service.xml
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/knoxauth/service.xml b/gateway-applications/src/main/resources/applications/knoxauth/service.xml
new file mode 100644
index 0000000..59b715b
--- /dev/null
+++ b/gateway-applications/src/main/resources/applications/knoxauth/service.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<service role="knoxauth" name="knoxauth" version="1.0.0">
+    <policies>
+        <policy role="webappsec"/>
+        <policy role="authentication"/>
+        <policy role="rewrite"/>
+        <policy role="identity-assertion"/>
+        <policy role="authorization"/>
+    </policies>
+    <routes>
+        <route path="/?**">
+            <policies>
+                <policy role="webappsec"/>
+                <policy role="authentication" name="Anonymous"/>
+                <policy role="identity-assertion"/>
+                <policy role="authorization"/>
+                <policy role="rewrite"/>
+            </policies>
+        </route>
+        <route path="/**?**">
+            <policies>
+                <policy role="webappsec"/>
+                <policy role="authentication" name="Anonymous"/>
+                <policy role="identity-assertion"/>
+                <policy role="authorization"/>
+                <policy role="rewrite"/>
+            </policies>
+        </route>
+    </routes>
+</service>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/3e36bc69/gateway-applications/src/main/resources/applications/knoxauth/styles/app-font.css
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/knoxauth/styles/app-font.css
b/gateway-applications/src/main/resources/applications/knoxauth/styles/app-font.css
new file mode 100644
index 0000000..c5a91ca
--- /dev/null
+++ b/gateway-applications/src/main/resources/applications/knoxauth/styles/app-font.css
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 300;
+  src: local('Open Sans Light'), local('OpenSans-Light'), url(../fonts/fontopensans/open-sans-300.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Open Sans'), local('OpenSans'), url(../fonts/fontopensans/open-sans-400.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 600;
+  src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(../fonts/fontopensans/open-sans-600.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 700;
+  src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../fonts/fontopensans/open-sans-700.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 300;
+  src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url(../fonts/fontopensans/open-sans-300i.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 400;
+  src: local('Open Sans Italic'), local('OpenSans-Italic'), url(../fonts/fontopensans/open-sans-400i.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 600;
+  src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(../fonts/fontopensans/open-sans-600i.woff)
format('woff');
+}
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 700;
+  src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(../fonts/fontopensans/open-sans-700i.woff)
format('woff');
+}
\ No newline at end of file


Mime
View raw message