Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit 9222a60

Browse files
Merge pull request #31 from solace-iot-team/feature-idp
Feature idp
2 parents a62dee6 + ad4d311 commit 9222a60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3416
-526
lines changed

ReleaseNotes.md

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
Solace Async API Management.
44

5+
## Version 0.2.0
6+
* [API-M Admin & Developer Portal](https://github.com/solace-iot-team/async-apim/tree/main/apim-portal): 0.2.0
7+
* [API-M Server OpenAPI](https://github.com/solace-iot-team/async-apim/blob/main/apim-server/server/common/api.yml): 0.2.0
8+
* [API-M Server](https://github.com/solace-iot-team/async-apim/tree/main/apim-server): 0.2.0
9+
* [API-M Connector OpenAPI](https://github.com/solace-iot-team/platform-api): 0.7.11
10+
11+
#### API-M Server / OpenAPI
12+
13+
**Framework:**
14+
* **IDP integration prep**
15+
- prep work for idp integration
16+
17+
**Retired:**
18+
* **Bootstrapping Users**
19+
- removed from startup of server.
20+
521
## Version 0.1.9
622
* [API-M Admin & Developer Portal](https://github.com/solace-iot-team/async-apim/tree/main/apim-portal): 0.1.9
723
* [API-M Server OpenAPI](https://github.com/solace-iot-team/async-apim/blob/main/apim-server/server/common/api.yml): 0.1.1

apim-portal/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "async-apim-portal",
3-
"version": "0.1.9",
3+
"version": "0.2.0",
44
"description": "Solace Async API Management Portal",
55
"repository": {
66
"type": "git",

apim-portal/src/admin-portal/components/ManageOrganizationUsers/ListOrganizationUsers.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ export const ListOrganizationUsers: React.FC<IListOrganizationUsersProps> = (pro
160160
loginAsHistory.push( {
161161
pathname: EUICommonResourcePaths.Login,
162162
state: {
163-
userId: mo.apEntityId.id,
164-
userPwd: mo.apUserAuthenticationDisplay.password,
163+
username: mo.apEntityId.id,
164+
password: mo.apUserAuthenticationDisplay.password,
165165
}
166166
});
167167
}

apim-portal/src/admin-portal/components/ManageSystemUsers/ListSystemUsers.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ export const ListSystemUsers: React.FC<IListSystemUsersProps> = (props: IListSys
139139
loginAsHistory.push( {
140140
pathname: EUICommonResourcePaths.Login,
141141
state: {
142-
userId: mo.apEntityId.id,
143-
userPwd: pwd
142+
username: mo.apEntityId.id,
143+
password: pwd
144144
}
145145
});
146146
}

apim-portal/src/components/ManageLoginAndSelect/UserLogin.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export const UserLogin: React.FC<IUserLoginProps> = (props: IUserLoginProps) =>
4444

4545
const transform_ManagedObject_To_FormDataEnvelope = (mo: TManagedObject): TManagedObjectFormDataEnvelope => {
4646
const fd: TManagedObjectFormData = {
47-
userId: mo.userId,
48-
userPwd: mo.userPwd,
47+
userId: mo.username,
48+
userPwd: mo.password,
4949
};
5050
return {
5151
formData: fd
@@ -58,8 +58,8 @@ export const UserLogin: React.FC<IUserLoginProps> = (props: IUserLoginProps) =>
5858
}): TManagedObject => {
5959
const mo: TManagedObject = orginalManagedObject;
6060
const fd: TManagedObjectFormData = formDataEnvelope.formData;
61-
mo.userId = fd.userId;
62-
mo.userPwd = fd.userPwd;
61+
mo.username = fd.userId;
62+
mo.password = fd.userPwd;
6363
return mo;
6464
}
6565

@@ -76,13 +76,13 @@ export const UserLogin: React.FC<IUserLoginProps> = (props: IUserLoginProps) =>
7676
const apiLogin = async(mo: TManagedObject, isLoginAs: boolean = false): Promise<TApiCallState> => {
7777
const funcName = 'apiLogin';
7878
const logName = `${ComponentName}.${funcName}()`;
79-
const userMessage: string = isLoginAs ? `login as ${mo.userId}` : `login ${mo.userId}`;
79+
const userMessage: string = isLoginAs ? `login as ${mo.username}` : `login ${mo.username}`;
8080
let callState: TApiCallState = ApiCallState.getInitialCallState(E_CALL_STATE_ACTIONS.API_LOGIN, userMessage);
8181
try {
8282
let apLoginUserDisplay: TAPLoginUserDisplay | undefined = undefined;
8383
if(isLoginAs) {
8484
apLoginUserDisplay = await APLoginUsersDisplayService.apsLoginAs({
85-
userId: mo.userId
85+
userId: mo.username
8686
});
8787
} else {
8888
apLoginUserDisplay = await APLoginUsersDisplayService.apsLogin({

apim-portal/src/displayServices/APUsersDisplayService/APLoginUsersDisplayService.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class APLoginUsersDisplayService extends APUsersDisplayService {
2828

2929
public create_Empty_ApUserLoginCredentials(): TAPUserLoginCredentials {
3030
const apUserLoginCredentials: TAPUserLoginCredentials = {
31-
userId: '',
32-
userPwd: ''
31+
username: '',
32+
password: ''
3333
};
3434
return apUserLoginCredentials;
3535
}
@@ -106,8 +106,8 @@ class APLoginUsersDisplayService extends APUsersDisplayService {
106106
let apsUser: APSUserResponse | undefined = undefined;
107107
try {
108108
const request: APSUserLoginCredentials = {
109-
userId: apUserLoginCredentials.userId,
110-
userPwd: apUserLoginCredentials.userPwd,
109+
username: apUserLoginCredentials.username,
110+
password: apUserLoginCredentials.password,
111111
};
112112
apsUser = await ApsLoginService.login({
113113
requestBody: request,
@@ -123,7 +123,7 @@ class APLoginUsersDisplayService extends APUsersDisplayService {
123123
// Note: it might be the root user, in which case, this will throw an error 404
124124
try {
125125
return await this.apsGet_ApLoginUserDisplay({
126-
userId: apUserLoginCredentials.userId,
126+
userId: apUserLoginCredentials.username,
127127
});
128128
} catch(e: any) {
129129
if(APSClientOpenApi.isInstanceOfApiError(e)) {

apim-server/.env

+18-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,24 @@ APIM_SERVER_LOGGER_APP_ID=devel-apim-server
1414
APIM_SERVER_LOGGER_LOG_LEVEL=trace
1515
#APIM_SERVER_LOGGER_LOG_LEVEL=info
1616
APIM_SERVER_REQUEST_SIZE_LIMIT=100kb
17-
APIM_SERVER_SECRET=mySecret
17+
; APIM_SERVER_SECRET=mySecret
1818
APIM_SERVER_ROOT_USER=[email protected]
1919
APIM_SERVER_ROOT_USER_PWD=admin123!
2020
APIM_SERVER_DATA_PATH=./data
21+
APIM_SERVER_COOKIE_SECRET = myCookieSecret
22+
23+
24+
# Auth
25+
# APIM_SERVER_AUTH_TYPE = oidc | internal | none
26+
APIM_SERVER_AUTH_TYPE = internal
27+
# internal auth
28+
APIM_SERVER_AUTH_INTERNAL_JWT_SECRET = myAuthJwtSecret
29+
# 15 minutes: 60 * 15 = 900 seconds
30+
APIM_SERVER_AUTH_INTERNAL_JWT_EXPIRY_SECS = 900
31+
APIM_SERVER_AUTH_INTERNAL_REFRESH_JWT_SECRET = myRefreshJwtSecret
32+
# 30 days = 60 * 60 * 24 * 30 = 2592000 seconds
33+
APIM_SERVER_AUTH_INTERNAL_REFRESH_JWT_EXPIRY_SECS = 2592000
34+
#future
35+
# APIM_SERVER_AUTH_WHITELISTED_DOMAINS = http://localhost:3000
36+
# oidc auth
37+
# todo

0 commit comments

Comments
 (0)