Deprecated - all the modules that still are used, have become extracted from this big project into small sub-projects.
- camel-utils -> https://github.com/ubirch/ubirch-camel-utils
- config -> https://github.com/ubirch/ubirch-config-utils
- crypto -> https://github.com/ubirch/ubirch-crypto-utils
- date -> https://github.com/ubirch/ubirch-date-utils
- deep-check-model -> https://github.com/ubirch/ubirch-deep-check-utils
- elasticsearch-client-binary -> deprecated
- elasticsearch-util -> (now incl. high-level-client) https://github.com/ubirch/ubirch-elasticsearch-utils
- json -> https://github.com/ubirch/ubirch-json-utils
- mongo-test-utils -> see next
- mongo-utils -> (now incl. test) https://github.com/ubirch/ubirch-mongo-utils
- neo4-config -> deprecated
- neo4-utils -> deprecated
- oidc-utils -> https://github.com/ubirch/ubirch-oidc-utils
- redis-test-util -> see next
- redis-util -> (now incl. test) https://github.com/ubirch/ubirch-redis-utils
- response-util -> https://github.com/ubirch/ubirch-response-utils
- rest-akka-http -> (now incl. test) https://github.com/ubirch/ubirch-rest-akka-http-utils
- rest-akka-http-test -> see previous
- uuid -> https://github.com/ubirch/ubirch-uuid-utils
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "camel-utils" % "1.0.0"
)
- deleted trait
CamelActorUtiland move endpoint uri generating code into new case classesSqsConfigConsumerandSqsConfigProducer
- update to
org.scalatest:scalatest:3.0.5
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "config" % "0.2.2"
)
Version 0.2.0 introduced the mandatory parameter: ubirch.envid. It consists of a prefix (e.g. ubirch) and a postfix (-local, -dev, -demo, -prod). Some examples:
ubirch.envid="ubirch-prod"
ubirch.envid="ubirch-demo"
ubirch.envid="ubirch-dev"
ubirch.envid="ubirch-local"
- update to
com.typesafe:config:1.3.3
- added protected methods:
**
ConfigBase.stringWithDefault()**ConfigBase.intWithDefault()**ConfigBase.booleanWithDefault()
- update to
org.scalatest:scalatest:3.0.5
- added method ConfigBase.environmentId()
- added object EnvironmentUtil
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "crypto" % "0.4.11"
)
- update to
joda-time:joda-time:2.10 - update to
org.joda:joda-convert:2.1.1
- update to
com.ubirch.util:config:0.2.3
- added trait
Encryption - added object
AES - added object
DES
- update to
org.scalatest:scalatest:3.0.5
- added sha512 version of signature validation (ECCUtil.validateSignatureSha512)
- added bin support to hash functions (related to ubirchProtocol)
- added sha512 version of bin sign function (related to ubirchProtocol)
- fixed PubKey decoding
- added sign function with new signature (pirvKey as PrivateKey)
- tuned performance (EdDSAEngine is now a static property)
- fixed private/public key parsing
- added sign for bin data
HashUtil: replace bcrypt methods with PBKDF2
- fixed merge error where
EccUtil.encodePublicKey()wasn't public
- added methods
HashUtil.bcrypt*()
- make
EccUtil.encodePublicKeypublic
- added EccUtil (sign/validate/keypair gen)
- fixed refactoring bug
- removed external dependency net.i2p.crypto" % "eddsa" % "0.1.0"
- we use a local copy of that project
- added new methods to HashUtil:
- sha256Base64(Array[Byte]
- sha512Base64(Array[Byte]
- migrated crypto code from old ubirch project to this util module.
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "date" % "0.5.2"
)
- update to
joda-time:joda-time:2.10 - update to
org.joda:joda-convert:2.1.1
- update to
org.scalatest:scalatest:3.0.5
- added method
DateUtil.toString_YYYY_MM_dd
- refactored stepSize parameter in
DateUtil.dateRangefromPeriodtoInt
- add method
DateUtil.todayAtMidnight
- add method
DateUtil.dateRange
- add method
DateUtil.parseDateToUTC()
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
"elasticsearch-releases" at "https://artifacts.elastic.co/maven"
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "deep-check-model" % "0.3.1"
)
- update to
com.ubirch.util:json:0.5.1
- update to
org.json4s:json4s-*:3.6.0 - update to
com.ubirch.util:json:0.5.0
- update to
org.scalatest:scalatest:3.0.5 - update to
com.ubirch.util:json:0.4.4
- add
DeepCheckResponseUtil
- update to
com.ubirch.util:json:0.4.3
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- extracted a refactored
DeepCheckResponsefrom com.ubirch.util:response-util:0.1.6
A client for Elasticsearch using the binary protocol through
TransportClient.
To use it mixin the trait ESSimpleStorage or ESBulkStorage and add the configuration documented below to your
project. If you prefer working with objects they exists as well under the same names.
In addition to this there's some other utils as well:
SortUtil
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
"elasticsearch-releases" at "https://artifacts.elastic.co/maven"
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "elasticsearch-client-binary" % "3.0.1", // ES 6.4.0
"com.ubirch.util" %% "elasticsearch-client-binary" % "2.5.1" // ES 5.6.10
)
The following config is required to use the Elasticsearch binary client (NOTE: there's no default config!!!).
| Config Item | Category | Description |
|---|---|---|
| esBinaryClient.connection.hosts | Connection | list of ES hosts to connect to |
| esBinaryClient.connection.xpackEnabled | Connection | (optional) set to "true" to activate Shield/X-Pack (default=false) |
| esBinaryClient.connection.settings | Connection | ES connection settings (like cluster, Shield/X-Pack configs, etc |
| esBinaryClient.bulk.bulkActions | Flush | max number of items to trigger flush |
| esBinaryClient.bulk.bulkSize | Flush | max size of of all documents (in mega bytes)) to trigger flush |
| esBinaryClient.bulk.flushInterval | Flush | maximum number of seconds between flushes |
| esBinaryClient.bulk.concurrentRequests | Connection Pool | maximum number of concurrent requests |
Example Config (minimum config to connect to cloud.elastic.co with Shield/X-Pack):
esBinaryClient {
connection {
hosts = ["1234asdf.us-east-1.aws.found.io:9343"]
xpackEnabled = true
settings = [
{ "cluster.name": "1234asdf" },
{ "xpack.security.user": ${ELASTIC_IO_USER}":"${ELASTIC_IO_PASSWORD} },
{ "xpack.security.transport.ssl.enabled": "true" },
{ "request.headers.X-Found-Cluster": "${cluster.name}" }
]
}
bulk { // only needed if you mixin `ESBulkStorage`
bulkActions = 10000
bulkSize = 10 # bulkSize in mega bytes
flushInterval = 1 # flush every x seconds
concurrentRequests = 2 # connection pooling: max concurrent requests
}
}
Example Config (extended config to connect to cloud.elastic.co with Shield/X-Pack):
esBinaryClient {
clusterName = "1234asdf"
connection {
hosts = [${esBinaryClient.clusterName}".us-east-1.aws.found.io:9343"]
xpackEnabled = true
settings = [
{ "cluster.name": ${esBinaryClient.clusterName} },
{ "xpack.security.user": ${ELASTIC_IO_USER}":"${ELASTIC_IO_PASSWORD} },
{ "xpack.security.transport.ssl.enabled": "true" },
{ "request.headers.X-Found-Cluster": "${cluster.name}" },
{ "xpack.ssl.key": "/path/to/client.key" }, // (optional)
{ "xpack.ssl.certificate": "/path/to/client.crt" }, // (optional)
{ "xpack.ssl.certificate_authorities": "/path/to/ca.crt" }, // (optional)
{ "transport.sniff": "true"}, // (optional)
{ "transport.ping_schedule": "5s"}, // (optional)
{ "client.transport.ping_timeout": "10s"}, // (optional) default: 5s
{ "client.transport.nodes_sampler_interval": "10s"} // (optional) default: 5s
]
}
bulk { // only needed if you mixin `ESBulkStorage`
bulkActions = 10000
bulkSize = 10 # bulkSize in mega bytes
flushInterval = 1 # flush every x seconds
concurrentRequests = 2 # connection pooling: max concurrent requests
}
}
Example Config (simple localhost cluster without Shield/X-Pack):
esBinaryClient {
connection {
hosts = ["localhost:9300", "localhost:9301"]
settings = [
{ "cluster.name": "my-test-cluster" }
]
}
bulk { // only needed if you mixin `ESBulkStorage`
bulkActions = 10000
bulkSize = 10 # bulkSize in mega bytes
flushInterval = 1 # flush every x seconds
concurrentRequests = 2 # connection pooling: max concurrent requests
}
}
- update to Elasticsearch 6.7.1
- update to
com.ubirch.util:deep-check-model:0.3.1 - update to
com.ubirch.util:json:0.5.1
- update to Elasticsearch 6.4.0
- removed unused parameters from:
ESStorageBase.()(ttl×tamp)ESBulkStorageBase.storeDocBulk()(timestamp)
- update to
com.ubirch.util:config:0.2.3
- update to
org.json4s:json4s-*:3.6.0 - update to
com.ubirch.util:json:0.5.0 - update to
com.ubirch.util:deep-check-model:0.3.0
- update to
org.scalatest:scalatest:3.0.5 - update to
com.ubirch.util:config:0.2.1 - update to
com.ubirch.util:deep-check-model:0.2.1 - update to
com.ubirch.util:json:0.4.4 - update to
com.ubirch.util:uuid:0.1.3
- update to Elasticsearch 5.6.10
- add
ESStorageBase.byDocumentId()methods
- re-release with update to
com.ubirch.util:config:0.2.0
- update to UUIDUtil 0.1.2
- update to Elasticsearch 5.6.8
- update to
com.ubirch.util:config:0.2.0
- added ESStorageBase.getAverage()
- changed backoffPolicy
- fixed deprecation warning (IndexRequest.source)
- update to Elasticsearch 5.6.5
- update to Elasticsearch 5.6.3
- update to Elasticsearch 5.6.1
- roll back to Elasticsearch 5.3.2
ESStorageBase.getDoccatches Elasticsearch 5.5 QueryShardExceptions, too, now (most common cause: no timestamp mapping on empty index)- change log level from error to info when catching a SearchParseException or QueryShardException in
ESStorageBase.getDoc()andESStorageBase.getDoc() - refactored
ESStorageBase.connectivityCheckto accept a doc index and type
- update to Elasticsearch 5.5.1 while remaining compatible with 5.3.2
- update to
com.ubirch.util:deep-check-model:0.2.0
- login with credentials on a 5.3 instance no longer works!!!
- update to
com.ubirch.util:json:0.4.3
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- add method
ESStorageBase.connectivityCheck
- update to com.ubirch.util:json:0.4.0
- update to com.ubirch.util:json:0.3.5
- updated Elasticsearch to 5.3.2
- replace log4j dependency with log4f-to-slf4j bridge (see https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.3/_using_another_logger.html)
- improve exception handling in
ESStorageBase - fix existential types problem in
SortUtil.sortBuilder
- update from Elasticsearch version 2.4.4 to 5.3.0
- update Elasticsearch from version 2.4.2 to 2.4.4
- refactored config to allow configuring more than one host (
esBinaryClient.connection.hostsreplaces:esBinaryClient.connection.hostandesBinaryClient.connection.port) - add Shield/X-Pack on/off switch: see config key
esBinaryClient.connection.xpackEnabled - removed config key
esBinaryClsient.connection.cluster - connection settings are now generic: see config key
esBinaryClient.connection.settings
- update json4s to version 3.5.1
- update Akka Http to 10.0.5
- update to com.ubirch.util:json:0.3.3
ESStorageBase.getDoccatches exceptions related to missing indexes and search parse errors (usually a cause of no mappings existing yet) and returns None instead of an exception- improved logging in
ESStorageBase.getDocs
- parameter
imestampin ESBulkStorageBase.storeDocBulk() now has a default value: now.getMillis
- added objects
ESSimpleStorageandESBulkStorage
This version is not compatible with 0.4.x releases
- enabled cluster support
- simplified usage in projects by adding host, port and cluster
- added connection config
Config Item Category Description esBinaryClient.connection.host Connection host ES is running on esBinaryClient.connection.port Connection port ES is running on esBinaryClient.connection.cluster Connection (optional) ES cluster to connect to
- added access to current ElasticSearch Client
- ElasticsearchStorage.getCurrentEsClient
- ElasticsearchBulkStorage.getCurrentEsClient
ElasticsearchBulkStorageparameters are read from a config now (NOTE: there's no default config!!!)
| Config Item | Category | Description |
|---|---|---|
| esBinaryClient.bulk.bulkActions | Flush | max number of items |
| esBinaryClient.bulk.bulkSize | Flush | max size of documents of all documents (in mega bytes)) |
| esBinaryClient.bulk.flushInterval | Flush | maximum number of seconds |
| esBinaryClient.bulk.concurrentRequests | Connection Pool | maximum number of concurrent requests |
Example Config:
esBinaryClient {
bulk {
bulkActions = 2000 # flush: max number of changes
bulkSize = 10 # flush: bulkSize in mega bytes
flushInterval = 5 # flush: flush every x seconds
concurrentRequests = 2 # connection pool: max concurrent requests
}
}
ElasticsearchStoragenow catchesSearchParseException, too- improved logging
- upgrade
uuiddependency to version 0.1.1
- switch to com.typesafe.scalalogging.slf4j.StrictLogging
- update dependencies to use Elasticsearch 2.4.2
- bugfix:
ElasticsearchBulkStorage.bulkProcessormust be lazy
- refactored
ElasticsearchBulkStorage.storeBulkData()method to be functionally equivalent toElasticsearchStorage.storeDoc() - minor refactoring in ElasticsearchStorage
ttlinElasticsearchStorage.storeDoc()is now zero by defaulttimestampinElasticsearchStorage.storeDoc()is now None by default
ElasticsearchStorage.storeDoc()now supports timestamp functionality
ElasticsearchStoragereferences JsonFormats.default now
- update dependency com.ubirch.util:json from version 0.3.1 to 0.3.2.
- update dependency com.ubirch.util:json from version 0.3 to 0.3.1.
- update dependency com.ubirch.util:json from version 0.2 to 0.3.
- update dependency com.ubirch.util:json from version 0.1 to 0.2.
- added
SortUtil.
- added sort parameter to
ElasticsearchStorage.getDocs.
- additional check:
fromandsizeparameters inElasticsearchStorage.getDocsmay not be negative.
- docId in
ElasticsearchStorage.storeDocis now optional.
- first release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.bintrayRepo("rick-beton", "maven"),
"elasticsearch-releases" at "https://artifacts.elastic.co/maven"
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "elasticsearch-util" % "3.0.1", // ES 6.4.0
"com.ubirch.util" %% "elasticsearch-util" % "2.5.1" // ES 5.6.10
)
- update to Elasticsearch 6.7.1
- increment version to match latest compatible version of
elasticsearch-client-binary
- update to Elasticsearch 6.4.0
- increment version to match latest compatible version of
elasticsearch-client-binary
- increment version to match latest compatible version of
elasticsearch-client-binary
- increment version to match latest compatible version of
elasticsearch-client-binary
- update to Elasticsearch 5.6.10
- increment version to match latest compatible version of
elasticsearch-client-binary
- increment version to match latest compatible version of
elasticsearch-client-binary
- update to Elasticsearch 5.6.5
- update to Elasticsearch 5.6.5
- update to Elasticsearch 5.6.3
- update to Elasticsearch 5.6.1
- roll back to Elasticsearch 5.3.2
- update to Elasticsearch 5.5.1 while remaining compatible with 5.3.2
- login with credentials on a 5.3 instance no longer works!!!
- updated Elasticsearch to 5.3.2
- update from Elasticsearch version 2.4.4 to 5.3.0
- update Elasticsearch from version 2.4.2 to 2.4.4
- refactored
ElasticsearchMappingsBaseto use the official ES driver'sIndicesAdminClientinstead of HTTP calls
- first release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.bintrayRepo("hseeberger", "maven")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "json" % "0.5.1"
)
- update to
joda-time:joda-time:2.10 - update to
org.joda:joda-convert:2.1.1
- update to
org.json4s:json4s-native:3.6.0 - update to
de.heikoseeberger:akka-http-json4s:1.21.0
- skipped version 0.4.3 as it was already taken from about a year ago --> skipping this one
- add method
Json4sUtil#string2any - update to
org.scalatest:scalatest:3.0.5
- add method
Json4sUtil#any2String
- update json4s to 3.5.2
- integrate code from com.ubirch.util:json-auto-convert:0.3.5
- add
DeepCheckResponsemodel
- update json4s to version 3.5.1
- added method com.ubirch.util.json.Json4sUtil#any2any
- introduced JsonFormats.default to have one fixed list of default formats
- fixed Json4sUtil.inputstream2jvalue()
- updated json4s dependencies to version 3.4.2
- deleted method Json4sUtil.string2Any
- added method Json4sUtil.inputstream2jvalue
all code from this module has been moved to com.ubirch.util:json:0.4.0+
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "lock-util" % "0.2.2"
)
- update to
com.ubirch.util:redis-util:0.5.2
- update to
com.ubirch.util:redis-util:0.5.1
- update to
com.ubirch.util:redis-util:0.5.0
- update to
org.scalatest:scalatest:3.0.5 - update to
com.ubirch.util:config:0.2.1 - update to
com.ubirch.util:redis-util:0.4.0
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "mongo-utils" % "0.8.4"
)
- update to
com.ubirch.util:deep-check-model:0.3.1
- update to
joda-time:joda-time:2.10 - update to
org.joda:joda-convert:2.1.1
- update to
com.ubirch.util:config:0.2.3
- DO NOT USE THIS RELEASE!!! it is unknown what changes it includes!!!
- update to
org.reactivemongo:reactivemongo:0.15.0
- update to
com.ubirch.util:deep-check-model:0.3.0
- update to
org.scalatest:scalatest:3.0.5 - update to
com.typesafe.akka:akka-(actor|slf4j):2.5.11 - update to
com.ubirch.util:config:0.2.1 - update to
com.ubirch.util:deep-check-model:0.2.1
- update to
com.typesafe.akka:akka-(actor|slf4j):2.4.20
- update to
com.typesafe.akka:akka-(actor|slf4j):2.4.19
- removed default value from
MongoConstraintsBase.constraintsToDrop - renamed
MongoConstraintsBase.constraintstoMongoConstraintsBase.constraintsToCreate
- allow deletion of MongoDB constraints (see
MongoConstraintsBase.dropMongoConstraints&MongoConstraintsBase.prepareMongoConstraints)
- add Mongo mapping for
BigIntandBigDecimal
- update to
com.ubirch.util:config:0.2.0
- update to
com.ubirch.util:deep-check-model:0.2.0
- update to
com.ubirch.util:deep-check-model:0.1.3
- update to reactivemongo 0.12.5
- introduce
MongoConstraintsBase
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- migrate from com.ubirch.util:response-util to com.ubirch.util:deep-check-model
- add method
MongoUtil.connectivityCheck
- update to reactivemongo 0.12.3
- update to Akka 2.4.18
- exclude Akka 2.3.x dependencies
- method
MongoUtil#dbis now a value to prevent too many open Mongo connections
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "mongo-test-utils" % "0.8.4"
)
- update to
com.ubirch.util:mongo-utils:0.8.4
- update to
com.ubirch.util:mongo-utils:0.8.3
- update to
com.ubirch.util:mongo-utils:0.8.2
- update to
com.ubirch.util:mongo-utils:0.8.0
- update to
com.ubirch.util:mongo-utils:0.7.0
- update to
com.ubirch.util:mongo-utils:0.6.0
- update to
com.ubirch.util:mongo-utils:0.5.3
- update to
com.ubirch.util:mongo-utils:0.5.1
- update to
com.ubirch.util:mongo-utils:0.5.0
- update to
com.ubirch.util:mongo-utils:0.4.1
- update to
com.ubirch.util:mongo-utils:0.4.0
- update to
com.ubirch.util:mongo-utils:0.3.7
- update to
com.ubirch.util:mongo-utils:0.3.6
- update to
com.ubirch.util:mongo-utils:0.3.5
- update to reactivemongo 0.12.5
- update to com.ubirch.util:mongo-utils:0.3.3
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- update com.ubirch.util:mongo-utils to 0.3.0
- update com.ubirch.util:mongo-utils to 0.2.3
- update to reactivemongo 0.12.3
- update to Akka 2.4.18
- update to _com.ubirch.util:mongo-utils:0.2.1
- upgrade
com.ubirch.util:mongo-utilsto version 0.2.0
- initial release
To use MongoClientBuilder the following configuration is needed ($PREFIX defaults to ubirch.mongo-utils and a default; a default configuration connecting to localhost:27017 is included):
| Config Item | Mandatory | Description |
|---|---|---|
| $PREFIX.hosts | yes | string of cluster hosts (see https://docs.mongodb.com/manual/reference/connection-string/) |
Here's an example of a config with more than one host:
YOUR_PREFIX {
// for uri formats see: https://docs.mongodb.com/manual/reference/connection-string/
user = ${MONGO_USER}
password = ${MONGO_PASSWORD}
port = 10250
options = "sslEnabled=true&sslAllowsInvalidCert=true&connectTimeoutMS=10000&maxIdleTimeMS=60000"
host1 = "mongodb://"${ubirch.mongo-utils.user}":"${ubirch.mongo-utils.password}"@ubirch001.documents.azure.com:"${ubirch.mongo-utils.port}"?"${ubirch.mongo-utils.options}
host2 = "mongodb://"${ubirch.mongo-utils.user}":"${ubirch.mongo-utils.password}"@ubirch002.documents.azure.com:"${ubirch.mongo-utils.port}"?"${ubirch.mongo-utils.options}
// the only mandatory configPath (all the others only serve the purpose to make constructing host uris easier)
hosts = ${ubirch.mongo-utils.host1}","${ubirch.mongo-utils.host2}
}
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "neo4j-config" % "0.1.0"
)
Through Neo4jConfigReader the following configuration is read:
Useful Links:
| Config Item | Mandatory | Default Value | Description |
|---|---|---|---|
| ubirch.neo4j.uri | no | "bolt://localhost:7687" | Neo4j URI |
| ubirch.neo4j.userName | no | "neo4j" | database user |
| ubirch.neo4j.password | no | "neo4jneo4j" | database password |
| ubirch.neo4j.encryptionRequired | no | true | true if connection needs to be encrypted |
| ubirch.neo4j.trustStrategy | no | "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES" | strategy by which to trust TLS certificates. possible values are: TRUST_ALL_CERTIFICATES, TRUST_SYSTEM_CA_SIGNED_CERTIFICATES |
| ubirch.neo4j.pool.maxLifetime | no | 60 minutes | maximum lifetime of pooled connection |
| ubirch.neo4j.pool.maxSize | no | 50 | maximum number of connections in pool |
| ubirch.neo4j.pool.acquisitionTimeout | no | 60 seconds | maximum number of seconds to wait when acquiring a connection from pool |
| ubirch.neo4j.timeout | no | 60 seconds | maximum number of seconds to wait for response before we let a connection time out |
| ubirch.neo4j.maxRetryTime | no | 60 seconds | maximum number of seconds in which to keep attempting retries of transaction functions |
| ubirch.neo4j.loadBalancingStrategy | no | "LEAST_CONNECTED" | Load balancing strategy when connecting to a Neo4j cluster. Possible values are: ROUND_ROBIN, LEAST_CONNECTED |
An example config:
ubirch {
neo4j {
uri = "bolt://neo4j.ubirch-dev.ubirch.com:7687"
userName = "neo4j"
password = "123456"
encryptionRequired = true
trustStrategy = "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES" // (TRUST_ALL_CERTIFICATES, TRUST_SYSTEM_CA_SIGNED_CERTIFICATES)
pool {
maxLifetime = 60 // minutes
maxPoolSize = 200
acquisitionTimeout = 60 // seconds
}
timeout = 60 // seconds
maxRetryTime = 60 // seconds
loadBalancingStrategy = "LEAST_CONNECTED" // (ROUND_ROBIN, LEAST_CONNECTED)
}
}
Minimum example config for local development:
ubirch {
neo4j {
trustStrategy = "TRUST_ALL_CERTIFICATES"
}
}
To read the neo4j config with keys exactly as described above:
val neo4jConfig = new Neo4jConfigReader().neo4jConfig()
With custom prefix (instead of ubirch.neo4j):
val neo4jConfig = new Neo4jConfigReader("ubirchKeyService.neo4j").neo4jConfig()
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "neo4j-utils" % "0.2.1"
)
A configuration will be needed in all environments except local. For details please refer to the configuration section
of neo4j-config.
- made
Neo4jParseUtil.keyValueToString()more flexible by introducing new parameters to configure how keys are separated from values and also for the enclosing characters of the resulting string
- added method
Neo4jParseUtil.keyValueToString()
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "oidc-utils" % "0.8.3"
)
To use the OidcDirective the following configuration is needed:
| Config Item | Mandatory | Description |
|---|---|---|
| ubirch.oidcUtils.redis.updateExpiry | yes | number of seconds by a token's expiry date is extended after successfully validating it |
| ubirch.redisUtil.redis.host | yes | Redis host |
| ubirch.redisUtil.redis.port | yes | Redis port |
| ubirch.redisUtil.redis.password | no | Redis password |
A default application.conf (connecting to localhost:6379) is included in this module.
One header is required by the directive:
- Authorization: Bearer $TOKEN (same as with OAuth2 tokens)
If the provided token is valid a UserContext object will be returned.
An example of how to use it can be found in OidcDirectiveSpec.
- update to
com.ubirch.util:json:0.5.1 - update to
com.ubirch.utilredis-util:0.5.2 - update to
com.ubirch.util:redis-test-util:0.5.2 - update to
com.ubirch.user:client-rest:1.0.1 - update to
com.ubirch.key:client-rest:0.11.1
- switch back to SHA-256 in
OidcUtil.tokenToHashedKey()
- switch back to unhashed redis keys for ubirch tokens (existing Redis keys would have to be migrated otherwise)
- removed field
UserContext.authToken - switched to storing hashed ubirch tokens when saving a
UserContextto Redis OidcUtil.tokenToHashedKey()now uses SHA-512 instead of SHA-256- extracted some of the config code to
OidcUtilConfig - update to
com.ubirch.util:crypto:0.4.11 - update to
com.ubirch.user:client-rest:1.0.0
- update to
com.ubirch.key:*:0.11.0
- update to
com.ubirch.key:*:0.8.0
- limited redis ubToken caching to current app enviroment
- change error logging to leg level error
- added skipEnvChecking feature
- started tp add signature checking for ubirchToken
- renamed UserContext.userId to .externalUserId
- update to
com.ubirch.user:client-rest:0.12.2
- update to
com.ubirch.util:crypto:0.4.10 - update to
com.ubirch.utilredis-util:0.5.1 - update to
com.ubirch.util:redis-test-util:0.5.1
- update to
com.ubirch.user:client-rest:0.11.0
- update to
org.json4s:json4s-*:3.6.0 - update to
com.ubirch.util:json:0.5.0 - update to
com.ubirch.util:redis-util:0.5.0 - update to
com.ubirch.util:redis-test-util:0.5.0 - update to
com.ubirch.user:client-rest:0.10.1
- update to
com.ubirch.util:crypto:0.4.9
- update to
org.scalatest:scalatest:3.0.5 - update to
com.typesafe.akka:akka-http(-testkit):10.1.3 - update to
com.ubirch.util:json:0.4.4 - update to
com.ubirch.util:crypto:0.4.8 - update to
com.ubirch.util:redis-util:0.4.0 - update to
com.ubirch.util:redis-test-util:0.4.0
- update Akka Http to 10.0.11
- updated to
com.ubirch.user:client-rest:0.8.4
- updated to
com.ubirch.util:redis-(test-)util:0.3.6
- updated to
com.ubirch.util:crypto:0.4.5
- updated to
com.ubirch.user:client-rest:0.8.3
- added constant
UbirchTokenUtil.providerId
- rename
TokenUtiltoUbirchTokenUtilfor clarity and to avoid duplication with an auth-service util - added method
UbirchTokenUtil.hashEmail()
- added
TokenUtilwith methodtoUbirchToken()
- reject not active user using ubirchToken
- add optional field UserContext.email
- updated to
com.ubirch.util:redis-util:0.3.5 - updated to
com.ubirch.util:redis-test-util:0.3.5 - updated to
com.ubirch.user:client-rest:0.7.0
- updated to
com.ubirch.util:crypto:0.4.1
- updated to
com.ubirch.util:crypto:0.4.0
- added ubirchToken auth (early beta)
- updated to
com.ubirch.user:client-rest:0.6.4
- improve logging of tokenKey expiry refreshes
- update to
com.ubirch.util:redis(-test)-utils:0.3.4
com.ubirch.util.oidc.directive.OidcDirective.bearerTokenis now public- update to
com.ubirch.util:json:0.4.3
- update Akka Http to 10.0.9
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- update com.ubirch.util:redis-test-util to 0.3.0
- update com.ubirch.util:redis-util to 0.3.0
- update com.ubirch.util:redis-util to 0.2.3
- update to com.ubirch.util:json:0.4.0
- update to com.ubirch.util:json:0.3.5
- update Akka Http to 10.0.6
- update to Akka 2.4.18
- add new fields to
UserContext:userNamelocale
- add field
providerIdtoUserContext
- update json4s to version 3.5.1
- update Akka Http to 10.0.5
- update to
redis-test-utils0.2.1
- config is now under a fixed prefix
OidcDirectivecreatesRedisClientinstance itself
- update to com.ubirch.util:json:0.3.3
- improved logging
- removed reading headers
X-UBIRCH-CONTEXTandX-UBIRCH-PROVIDERfromOidcDirective OidcUtil.tokenToHashedKeyaccepts only a token (removed parameterprovider)
- initial release
libraryDependencies ++= Seq(
"com.ubirch.util" %% "redis-test-util" % "0.5.2"
)
The required config is documented in the redis-util section.
- update to
com.ubirch.util:redis-util:0.5.2
- update to
com.ubirch.util:redis-util:0.5.1
- update to
com.ubirch.util:redis-util:0.5.0
- update to
com.ubirch.util:redis-util:0.4.0
- update to
com.ubirch.util:redis-util:0.3.6
- update to
com.ubirch.util:redis-util:0.3.5
- update to
com.ubirch.util:redis-util:0.3.4
- update to
com.ubirch.util:redis-util:0.3.3
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- update com.ubirch.util:redis-util to 0.3.0
- update com.ubirch.util:redis-util to 0.2.3
- update to Akka 2.4.18
- refactor
com.ubirch.util.redis.test.RedisCleanup.deleteAllto depends on implictRedisClient(instead of creating the whole environment itself)
- updated to
redis-utilversion 0.2.0
- initial release
libraryDependencies ++= Seq(
"com.ubirch.util" %% "redis-util" % "0.5.2"
)
You can place the below config keys where you want in the config. When calling RedisClientUtil.getRedisClient() the
following configuration is needed:
| Config Item | Mandatory | Description |
|---|---|---|
| ubirch.redisUtil.host | yes | host redis is running on |
| ubirch.redisUtil.port | yes | redis TCP port |
| ubirch.redisUtil.password | no | redis password |
Here's an example:
ubirch.redisUtil {
host = localhost
port = 6379
password = not-a-secure-password
}
And this how you get a redis client:
```scala
implicit val system = ActorSystem()
implicit val timeout = Timeout(15 seconds)
val redis = RedisClientUtil.getRedisClient
```
- update to
com.ubirch.util:deep-check-model:0.3.1
- update to
com.ubirch.util:config:0.2.3
- update to
com.ubirch.util:deep-check-model:0.3.0
- update to
com.typesafe.akka:akka-(actor|slf4j):2.5.11 - update to
com.ubirch.util:config:0.2.1 - update to
com.ubirch.util:deep-check-model:0.2.1
- update to
com.typesafe.akka:akka-(actor|slf4j):2.4.20
- update to
com.ubirch.util:config:0.2.0
- update to
com.ubirch.util:deep-check-model:0.2.0
- update to
com.ubirch.util:deep-check-model:0.1.3
- update to com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- migrate from com.ubirch.util:response-util to com.ubirch.util:deep-check-model
- add method
RedisClientUtil.connectivityCheck
- update to Akka 2.4.18
RedisClientUtilreads config from a fixed prefix now
- initial release
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "response-util" % "0.5.0"
)
- added
AuthUtil
- update to
com.ubirch.util:json:0.5.1
- update to
com.ubirch.util:json:0.5.0
- update to
org.scalatest:scalatest:3.0.5 - update to
com.typesafe.akka:akka-http(-testkit):10.1.3 - update to
com.ubirch.util:json:0.4.4
- update Akka Http to 10.0.11
- update to
com.ubirch.util:json:0.4.3
- update Akka Http to 10.0.9
- update to
com.ubirch.util:json:0.4.2
- update json4s to 3.5.2
- extracted a refactored
DeepCheckResponseto new module: com.ubirch.util:deep-check-model:0.1.0
- update to com.ubirch.util:json:0.4.0
- changed
ResponseUtilto extendMyJsonProtocol
- update to com.ubirch.util:json:0.3.5
- refactored
ResponseUtilto acceptAnyRefinstead of justJsonResponse
- update Akka Http to 10.0.6
- update Akka Http to 10.0.5
- update to Akka HTTP 10.0.3
- changed artifact name from
responseutiltoresponse-util - refactor
ResponseUtilto allow passing in http status codes (only for errors))
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "rest-akka-http" % "0.4.0" // for Akka HTTP 10.1.3
"com.ubirch.util" %% "rest-akka-http" % "0.3.9" // for Akka HTTP 10.0.11
"com.ubirch.util" %% "rest-akka-http" % "0.3.8" // for Akka HTTP 10.0.9
"com.ubirch.util" %% "rest-akka-http" % "0.3.7" // for Akka HTTP 10.0.6
)
- update to
org.scalatest:scalatest:3.0.5 - update to
ch.megard:akka-http-cors:0.3.0 - update to
com.typesafe.akka:akka-http(-testkit):10.1.3
- update Akka Http to 10.0.11
- update Akka Http to 10.0.9
- switch to using a CORS library: https://github.com/lomigmegard/akka-http-cors
- update Akka Http to 10.0.6
- no changes (updated version number to be the same as
rest-akka-http-test)
- update Akka Http to 10.0.5
- add
AuthorizationtoAccess-Control-Allow-Headers
- update to Akka HTTP 10.0.3
- update to Akka HTTP 2.4.11.1
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "rest-akka-http-test" % "0.4.0" // for Akka HTTP 10.1.3
"com.ubirch.util" %% "rest-akka-http-test" % "0.3.9" // for Akka HTTP 10.0.11
"com.ubirch.util" %% "rest-akka-http-test" % "0.3.8" // for Akka HTTP 10.0.9
"com.ubirch.util" %% "rest-akka-http-test" % "0.3.7" // for Akka HTTP 10.0.6
)
- update to
org.scalatest:scalatest:3.0.5 - update to
com.typesafe.akka:akka-http(-testkit):10.1.3
- update Akka Http to 10.0.11
- update Akka Http to 10.0.9
- switch to using a CORS library: https://github.com/lomigmegard/akka-http-cors
- updated
CORSUtilto conform with CORS library
- update Akka Http to 10.0.6
- fixed bug in
CORSUtil
- update Akka Http to 10.0.5
- no changes
- incremented version to remain the as for module
rest-akka-http
- update to Akka HTTP 10.0.3
- update to Akka HTTP 2.4.11.1
- initial release for Akka 2.4.11
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
)
libraryDependencies ++= Seq(
"com.ubirch.util" %% "uuid" % "0.1.3"
)
- update to
org.scalatest:scalatest:3.0.5
- added from/toByteArray
- add method
UUIDUtil.fromString