...
 
Commits (5)
    https://gitcode.net/maxkeytop/MaxKey/-/commit/d459a8bd8c590dfd56ad91eb73d5ca0ac9e6340d update readme 2023-07-11T09:07:39+08:00 MaxKey shimingxy@qq.com https://gitcode.net/maxkeytop/MaxKey/-/commit/5b80acae2d479177ab0568134c6079098732ae73 资源管理无法添加资源 #I7EPYO 2023-07-11T09:33:00+08:00 MaxKey shimingxy@qq.com https://gitcode.net/maxkeytop/MaxKey/-/commit/dd87b4ea983fe54d16bf3eeba13742fbc45b61ce 新增角色失败,数据入库问题。 #I7KMSJ 2023-07-13T08:02:22+08:00 MaxKey shimingxy@qq.com https://gitcode.net/maxkeytop/MaxKey/-/commit/32462ebeef739c4a5010b802bede868277abaeac password Test 2023-07-13T08:03:32+08:00 MaxKey shimingxy@qq.com https://gitcode.net/maxkeytop/MaxKey/-/commit/bf84b27fc0dc745f0640a2a8faedd2aecfda098a /sign/authz/cas/v1/tickets这个接口只要用户名正确,密码随便填都能通过 #I7LC07 2023-07-17T11:22:40+08:00 MaxKey shimingxy@qq.com
...@@ -120,7 +120,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab ...@@ -120,7 +120,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
| Version | Date | Pan URL (Code) | Docker | | Version | Date | Pan URL (Code) | Docker |
| -------- | :----- | :---- | :---- | | -------- | :----- | :---- | :---- |
| v 3.5.18 | 2023/06/05 | <a href="https://pan.baidu.com/s/1n-_cvb7nuLKOEmruSPVvDw" target="_blank">Download</a> ( **mxk9** ) | <a href="https://hub.docker.com/u/maxkeytop" target="_blank">Home</a> | | v 3.5.18 | 2023/06/05 | <a href="https://pan.baidu.com/s/1-7xpL6KapBx6WU3cOffsmg" target="_blank">Download</a> ( **mxk9** ) | <a href="https://hub.docker.com/u/maxkeytop" target="_blank">Home</a> |
# License # License
......
...@@ -120,7 +120,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab ...@@ -120,7 +120,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
| Version | Date | Pan URL (Code) | Docker | | Version | Date | Pan URL (Code) | Docker |
| -------- | :----- | :---- | :---- | | -------- | :----- | :---- | :---- |
| v 3.5.18 | 2023/06/05 | <a href="https://pan.baidu.com/s/1n-_cvb7nuLKOEmruSPVvDw" target="_blank">Download</a> ( **mxk9** ) | <a href="https://hub.docker.com/u/maxkeytop" target="_blank">Home</a> | | v 3.5.18 | 2023/06/05 | <a href="https://pan.baidu.com/s/1-7xpL6KapBx6WU3cOffsmg" target="_blank">Download</a> ( **mxk9** ) | <a href="https://hub.docker.com/u/maxkeytop" target="_blank">Home</a> |
# License # License
......
...@@ -121,7 +121,7 @@ MaxKey注重企业级场景下的性能、安全和易用性,广泛应用于 ...@@ -121,7 +121,7 @@ MaxKey注重企业级场景下的性能、安全和易用性,广泛应用于
| 版本 | 日期 | 网盘(提取码) | Docker | | 版本 | 日期 | 网盘(提取码) | Docker |
| -------- | :----- | :---- | :---- | | -------- | :----- | :---- | :---- |
| v 3.5.18 | 2023/06/05 | <a href="https://pan.baidu.com/s/1n-_cvb7nuLKOEmruSPVvDw" target="_blank">下载</a>( **mxk9** ) |<a href="https://hub.docker.com/u/maxkeytop" target="_blank">链接</a> | | v 3.5.18 | 2023/06/05 | <a href="https://pan.baidu.com/s/1-7xpL6KapBx6WU3cOffsmg" target="_blank">下载</a>( **mxk9** ) |<a href="https://hub.docker.com/u/maxkeytop" target="_blank">链接</a> |
# License # License
......
/*
* 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.crypto.password;
public class SM4PasswordEncoderTest {
public static void main(String[] args) {
Md4PasswordEncoder sm4 = new Md4PasswordEncoder();
System.out.println(sm4.encode("maxkeypassword"));
String c="{BQWoTG+C4jL8d8QNIu0jL1WkMWezxNAZtliNoJOke5k=}8cfc46546a5996e74442183bd122f370";
System.out.println(sm4.matches("maxkeypassword",c));
}
}
/*
* 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.crypto.password;
public class StandardPasswordEncoderTest {
public static void main(String[] args) {
StandardPasswordEncoder spe = new StandardPasswordEncoder();
System.out.println(spe.encode("maxkeypassword"));
String c="4b60c81ad4c31d97fbe8c87952f8de7a329ceb004261c8bd22254cfa8aa096bede6efbafcc84bade";
System.out.println(spe.matches("maxkeypassword",c));
}
}
...@@ -43,6 +43,7 @@ import org.springframework.http.HttpStatus; ...@@ -43,6 +43,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -81,10 +82,14 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{ ...@@ -81,10 +82,14 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
throw new BadCredentialsException("No credentials are provided or extracted to authenticate the REST request"); throw new BadCredentialsException("No credentials are provided or extracted to authenticate the REST request");
} }
LoginCredential loginCredential =new LoginCredential(username,password,"CASREST"); LoginCredential loginCredential =new LoginCredential(username,password,"normal");
Authentication authentication = authenticationProvider.authenticate(loginCredential);
if(authentication == null) {
_logger.debug("Bad Credentials Exception");
return new ResponseEntity<>("Bad Credentials", HttpStatus.BAD_REQUEST);
}
authenticationProvider.authenticate(loginCredential,false);
TicketGrantingTicketImpl ticketGrantingTicket=new TicketGrantingTicketImpl("Random",AuthorizationUtils.getAuthentication(),null); TicketGrantingTicketImpl ticketGrantingTicket=new TicketGrantingTicketImpl("Random",AuthorizationUtils.getAuthentication(),null);
String ticket=casTicketGrantingTicketServices.createTicket(ticketGrantingTicket); String ticket=casTicketGrantingTicketServices.createTicket(ticketGrantingTicket);
......
...@@ -76,6 +76,8 @@ export class RoleEditerComponent implements OnInit { ...@@ -76,6 +76,8 @@ export class RoleEditerComponent implements OnInit {
this.selectValues = this.form.model.orgIdsList.split(','); this.selectValues = this.form.model.orgIdsList.split(',');
this.cdr.detectChanges(); this.cdr.detectChanges();
}); });
} else {
this.form.model.category = 'static';
} }
} }
......
...@@ -41,6 +41,8 @@ import { ResourcesService } from '../../../../service/resources.service'; ...@@ -41,6 +41,8 @@ import { ResourcesService } from '../../../../service/resources.service';
}) })
export class ResourceEditerComponent implements OnInit { export class ResourceEditerComponent implements OnInit {
@Input() id?: String; @Input() id?: String;
@Input() appId?: String;
@Input() appName?: String;
@Input() parentNode?: NzTreeNode; @Input() parentNode?: NzTreeNode;
@Input() isEdit?: boolean; @Input() isEdit?: boolean;
...@@ -71,6 +73,8 @@ export class ResourceEditerComponent implements OnInit { ...@@ -71,6 +73,8 @@ export class ResourceEditerComponent implements OnInit {
}); });
} else { } else {
if (this.parentNode) { if (this.parentNode) {
this.form.model.appId = this.appId || '';
this.form.model.appName = this.appName || '';
this.form.model.parentId = this.parentNode?.key; this.form.model.parentId = this.parentNode?.key;
this.form.model.parentName = this.parentNode?.title; this.form.model.parentName = this.parentNode?.title;
} }
......
...@@ -149,7 +149,9 @@ export class ResourcesComponent implements OnInit { ...@@ -149,7 +149,9 @@ export class ResourcesComponent implements OnInit {
nzComponentParams: { nzComponentParams: {
isEdit: false, isEdit: false,
parentNode: this.treeNodes.activated, parentNode: this.treeNodes.activated,
id: '' id: '',
appId: this.query.params.appId,
appName: this.query.params.appName
}, },
nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000)) nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
}); });
......