[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated (2652ebff -> 59900a47)
From: |
gnunet |
Subject: |
[libeufin] branch master updated (2652ebff -> 59900a47) |
Date: |
Tue, 26 Sep 2023 11:12:26 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a change to branch master
in repository libeufin.
from 2652ebff Docker readme
new 042bfec6 fix docker launcher config param
new c005dbe2 follow-up
new 19ea65bc follow-up
new 59900a47 Testing token default lifetime.
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
bank/src/test/kotlin/LibeuFinApiTest.kt | 9 +++++++--
contrib/docker-launcher/Dockerfile | 1 +
contrib/docker-launcher/launch-bank.sh | 4 ++--
contrib/{ => docker-launcher}/libeufin-bank.conf | 2 +-
4 files changed, 11 insertions(+), 5 deletions(-)
copy contrib/{ => docker-launcher}/libeufin-bank.conf (87%)
diff --git a/bank/src/test/kotlin/LibeuFinApiTest.kt
b/bank/src/test/kotlin/LibeuFinApiTest.kt
index c0cbaaa5..4cd2323f 100644
--- a/bank/src/test/kotlin/LibeuFinApiTest.kt
+++ b/bank/src/test/kotlin/LibeuFinApiTest.kt
@@ -141,7 +141,7 @@ class LibeuFinApiTest {
application {
corebankWebApp(db, ctx)
}
- client.post("/accounts/foo/token") {
+ val newTok = client.post("/accounts/foo/token") {
expectSuccess = true
contentType(ContentType.Application.Json)
basicAuth("foo", "pw")
@@ -151,6 +151,11 @@ class LibeuFinApiTest {
""".trimIndent()
)
}
+ // Checking that the token lifetime defaulted to 24 hours.
+ val newTokObj =
Json.decodeFromString<TokenSuccessResponse>(newTok.bodyAsText())
+ val newTokDb =
db.bearerTokenGet(Base32Crockford.decode(newTokObj.access_token))
+ val lifeTime = newTokDb!!.expirationTime - newTokDb.creationTime
+ assert(Duration.ofHours(24).seconds * 1000000 == lifeTime)
// foo tries on bar endpoint
val r = client.post("/accounts/bar/token") {
expectSuccess = false
@@ -171,7 +176,7 @@ class LibeuFinApiTest {
)
)
)
- // Testing the bearer-token:-scheme.
+ // Testing the secret-token:-scheme.
client.post("/accounts/foo/token") {
headers.set("Authorization", "Bearer
secret-token:${Base32Crockford.encode(fooTok)}")
contentType(ContentType.Application.Json)
diff --git a/contrib/docker-launcher/Dockerfile
b/contrib/docker-launcher/Dockerfile
index 965aa0fb..e39f4441 100644
--- a/contrib/docker-launcher/Dockerfile
+++ b/contrib/docker-launcher/Dockerfile
@@ -11,6 +11,7 @@ RUN ./configure --prefix=/usr/local
RUN make install
WORKDIR /
COPY launch-bank.sh /launch-bank.sh
+COPY libeufin-bank.conf /libeufin-bank.conf
RUN apt-get install -y sudo
RUN grep -v ^host.*all /etc/postgresql/15/main/pg_hba.conf >
/tmp/pg_hba_buf.txt
RUN echo "host libeufincheck all 127.0.0.1/32 trust" >> /tmp/pg_hba_buf.txt
diff --git a/contrib/docker-launcher/launch-bank.sh
b/contrib/docker-launcher/launch-bank.sh
index 35b510fb..d895eaff 100755
--- a/contrib/docker-launcher/launch-bank.sh
+++ b/contrib/docker-launcher/launch-bank.sh
@@ -3,5 +3,5 @@
service postgresql start
sudo -u postgres createuser -s root
createdb libeufinbank
-libeufin-bank dbinit
-libeufin-bank serve
+libeufin-bank dbinit -c /libeufin-bank.conf
+libeufin-bank serve -c /libeufin-bank.conf
diff --git a/contrib/libeufin-bank.conf
b/contrib/docker-launcher/libeufin-bank.conf
similarity index 87%
copy from contrib/libeufin-bank.conf
copy to contrib/docker-launcher/libeufin-bank.conf
index 468a0eda..3add3927 100644
--- a/contrib/libeufin-bank.conf
+++ b/contrib/docker-launcher/libeufin-bank.conf
@@ -11,7 +11,7 @@ PORT = 8080
[libeufin-bankdb-postgres]
# Where are the SQL files to setup our tables?
-SQL_DIR = $DATADIR/sql/libeufin-bank/
+SQL_DIR = /usr/local/share/taler/sql/libeufin-bank/
# DB connection string
CONFIG = postgresql:///libeufinbank
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (2652ebff -> 59900a47),
gnunet <=