Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tightening GUI security (authorizations)
- Loading branch information
Showing
10 changed files
with
212 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/PageTestNoAuthorizations.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2010-2017 Evolveum | ||
~ | ||
~ 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. | ||
--> | ||
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<body> | ||
<wicket:extend> | ||
|
||
<div class="row"> | ||
<div class="col-md-offset-2 col-md-8 col-lg-offset-4 col-lg-4"> | ||
<div class="panel panel-default" style="margin-top: 120px;"> | ||
<div class="panel-body"> | ||
TOP SECRET, burn before reading. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</wicket:extend> | ||
|
||
</body> | ||
</html> |
67 changes: 67 additions & 0 deletions
67
gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/PageTestNoAuthorizations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (c) 2017 Evolveum | ||
* | ||
* 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 com.evolveum.midpoint.web.page; | ||
|
||
import com.evolveum.midpoint.gui.api.page.PageBase; | ||
import com.evolveum.midpoint.schema.result.OperationResult; | ||
import com.evolveum.midpoint.task.api.Task; | ||
import com.evolveum.midpoint.util.exception.ObjectNotFoundException; | ||
import com.evolveum.midpoint.util.exception.SchemaException; | ||
import com.evolveum.midpoint.util.logging.Trace; | ||
import com.evolveum.midpoint.util.logging.TraceManager; | ||
import com.evolveum.midpoint.web.application.PageDescriptor; | ||
import com.evolveum.midpoint.web.component.form.Form; | ||
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; | ||
import com.evolveum.midpoint.web.page.forgetpassword.PageForgotPassword; | ||
import com.evolveum.midpoint.web.security.MidPointApplication; | ||
import com.evolveum.midpoint.web.security.SecurityUtils; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsPolicyType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.RegistrationsPolicyType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType; | ||
|
||
import org.apache.commons.lang.StringUtils; | ||
import org.apache.wicket.RestartResponseException; | ||
import org.apache.wicket.ajax.AjaxRequestTarget; | ||
import org.apache.wicket.ajax.markup.html.AjaxLink; | ||
import org.apache.wicket.markup.ComponentTag; | ||
import org.apache.wicket.markup.MarkupStream; | ||
import org.apache.wicket.markup.html.WebMarkupContainer; | ||
import org.apache.wicket.markup.html.link.BookmarkablePageLink; | ||
import org.apache.wicket.protocol.http.servlet.ServletWebRequest; | ||
import org.apache.wicket.request.cycle.RequestCycle; | ||
import org.springframework.security.web.WebAttributes; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpSession; | ||
|
||
/** | ||
* Page with no authorizations. It is used for testing: to make sure that nobody can access this page. | ||
*/ | ||
@PageDescriptor(url = "/noautz") | ||
public class PageTestNoAuthorizations extends PageBase { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private static final Trace LOGGER = TraceManager.getTrace(PageTestNoAuthorizations.class); | ||
|
||
public PageTestNoAuthorizations() { | ||
} | ||
|
||
@Override | ||
protected void createBreadcrumb() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.