Skip to content

Commit

Permalink
feat: rename JSON message configuration properties to conform karate …
Browse files Browse the repository at this point in the history
…test framework (#7186)

* chore: rename json properties

Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>

* chore: rename json properties

Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>

---------

Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
  • Loading branch information
yurem and moabu committed Dec 22, 2023
1 parent 8b99d05 commit 1dc880d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 32 deletions.
6 changes: 3 additions & 3 deletions docker-jans-persistence-loader/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,9 @@ def update_config(self):
entry.attrs["jansMessageConf"] = json.dumps({
"messageProviderType": "NULL",
"postgresConfiguration": {
"db-schema-name": "public",
"message-wait-millis": 100,
"message-sleep-thread-millis": 200,
"dbSchemaName": "public",
"messageWaitMillis": 100,
"messageSleepThreadTime": 200,
},
"redisConfiguration": {
"servers": "localhost:6379",
Expand Down
32 changes: 16 additions & 16 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7862,20 +7862,20 @@ components:
type: string
selected:
type: boolean
whitePagesCanView:
type: boolean
userCanView:
type: boolean
adminCanView:
type: boolean
adminCanEdit:
type: boolean
userCanEdit:
type: boolean
userCanView:
type: boolean
adminCanAccess:
type: boolean
userCanAccess:
type: boolean
whitePagesCanView:
type: boolean
baseDn:
type: string
PatchRequest:
Expand Down Expand Up @@ -9867,29 +9867,29 @@ components:
PostgresMessageConfiguration:
type: object
properties:
jdbc.driver.class-name:
driverClassName:
type: string
db-schema-name:
dbSchemaName:
type: string
connection-uri:
connectionUri:
type: string
auth-user-name:
authUserName:
type: string
auth-user-password:
authUserPassword:
type: string
connection-pool-max-total:
connectionPoolMaxTotal:
type: integer
format: int32
connection-pool-max-idle:
connectionPoolMaxIdle:
type: integer
format: int32
connection-pool-min-idle:
connectionPoolMinIdle:
type: integer
format: int32
message-wait-millis:
messageWaitMillis:
type: integer
format: int32
message-sleep-thread-millis:
messageSleepThreadTime:
type: integer
format: int32
RedisMessageConfiguration:
Expand Down Expand Up @@ -10102,10 +10102,10 @@ components:
ttl:
type: integer
format: int32
opbrowserState:
type: string
persisted:
type: boolean
opbrowserState:
type: string
SessionIdAccessMap:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Feature: Verify Message configuration endpoint
And header Authorization = 'Bearer ' + accessToken
And header Content-Type = 'application/json-patch+json'
And header Accept = 'application/json'
And request "[ {\"op\":\"replace\", \"path\": \"/db-schema-name\", \"value\":\""+response.db-schema-name+"\"} ]"
And request "[ {\"op\":\"replace\", \"path\": \"/dbSchemaName\", \"value\":\""+response.dbSchemaName+"\"} ]"
And path 'postgres'
Then print request
When method PATCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,31 @@
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* @author Yuriy Movchan Date: 30/11/2023
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class PostgresMessageConfiguration implements Serializable {

@JsonProperty("jdbc.driver.class-name")
private String driverClassName;

@JsonProperty("db-schema-name")
private String dbSchemaName;

@JsonProperty( "connection-uri")
private String connectionUri;

@JsonProperty("auth-user-name")
private String authUserName;

@JsonProperty("auth-user-password")
private String authUserPassword;

@JsonProperty("connection-pool-max-total")
private Integer connectionPoolMaxTotal;

@JsonProperty("connection-pool-max-idle")
private Integer connectionPoolMaxIdle;

@JsonProperty("connection-pool-min-idle")
private Integer connectionPoolMinIdle;

@JsonProperty("message-wait-millis")
private Integer messageWaitMillis;

@JsonProperty("message-sleep-thread-millis")
private Integer messageSleepThreadTime;

public String getDriverClassName() {
Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/jans_setup/templates/configuration.ldif
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dn: ou=configuration,o=jans
jansCacheConf: {"cacheProviderType": "%(cache_provider_type)s", "memcachedConfiguration": {"servers":"localhost:11211", "maxOperationQueueLength":100000, "bufferSize":32768, "defaultPutExpiration":60, "connectionFactoryType": "DEFAULT"}, "inMemoryConfiguration": {"defaultPutExpiration":60}, "nativePersistenceConfiguration": {"defaultPutExpiration":60, "defaultCleanupBatchSize": 10000}, "redisConfiguration":{"servers":"localhost:6379", "defaultPutExpiration": 60}}
jansMessageConf: {"messageProviderType": "NULL", "postgresConfiguration": {"connection-uri" : "jdbc:postgresql://localhost:5432/postgres", "db-schema-name":"public", "auth-user-name" : "postgres", "auth-user-password" : "", "message-wait-millis": 100, "message-sleep-thread-millis": 200}, "redisConfiguration":{"servers":"localhost:6379"}}
jansMessageConf: {"messageProviderType": "NULL", "postgresConfiguration": {"connectionUri" : "jdbc:postgresql://localhost:5432/postgres", "dbSchemaName":"public", "authUserName" : "postgres", "authUserPassword" : "", "messageWaitMillis": 100, "messageSleepThreadTime": 200}, "redisConfiguration":{"servers":"localhost:6379"}}
jansDocStoreConf: {"documentStoreType":"LOCAL","localConfiguration":{"baseLocation":"/"},"jcaConfiguration":{"serverUrl":"http://localhost:8080/rmi","workspaceName":"default","connectionTimeout":15,"userId":"admin","password":""},"webDavConfiguration":null}
jansDbAuth: {"type": "auth", "name": null, "level": 0, "priority": 1, "enabled": false, "version": 0, "config": {"configId": "auth_ldap_server", "servers": ["%(ldap_hostname)s:%(ldaps_port)s"], "maxConnections": 1000, "bindDN": "%(ldap_binddn)s", "bindPassword": "%(ldap_bind_encoded_pw)s", "useSSL": "true", "baseDNs": ["ou=people,o=jans"], "primaryKey": "uid", "localPrimaryKey": "uid", "useAnonymousBind": false, "enabled": false}}
jansSmtpConf: {"key_store":"%(smtp_jks_fn)s", "key_store_password":"%(smtp_jks_pass_enc)s", "key_store_alias":"%(smtp_alias)s", "signing_algorithm":"%(smtp_signing_alg)s"}
Expand Down

0 comments on commit 1dc880d

Please sign in to comment.