libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit b8041b128e787dfcdfb4b8edeadb342aedf5c515
parent f1fead3a0ac70a218d510b5ef337c70b83b13136
Author: MS <ms@taler.net>
Date:   Tue, 13 Dec 2022 14:45:14 +0100

remove addressed note

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 11++++-------
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 17-----------------
2 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -27,10 +27,7 @@ import io.ktor.request.* import io.ktor.response.respond import io.ktor.response.respondText import io.ktor.util.AttributeKey -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.withContext import org.apache.xml.security.binding.xmldsig.RSAKeyValueType -import org.jetbrains.exposed.exceptions.ExposedSQLException import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.statements.api.ExposedBlob @@ -287,10 +284,10 @@ fun buildCamtString( * - Proprietary code of the bank transaction * - Id of the servicer (Issuer and Code) */ - val creationTime = getUTCnow() // FIXME: should this be the payment time? - val dashedDate = creationTime.toDashedDate() - val zonedDateTime = creationTime.toZonedString() - val creationTimeMillis = creationTime.toInstant().toEpochMilli() + val camtCreationTime = getUTCnow() // FIXME: should this be the payment time? + val dashedDate = camtCreationTime.toDashedDate() + val zonedDateTime = camtCreationTime.toZonedString() + val creationTimeMillis = camtCreationTime.toInstant().toEpochMilli() val messageId = "sandbox-${creationTimeMillis}" val currency = getDefaultDemobank().currency diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -17,23 +17,6 @@ * <http://www.gnu.org/licenses/> */ - -/* -General thoughts: - - - since sandbox will run on the public internet for the demobank, all endpoints except - explicitly public ones should use authentication (basic auth) - - the authentication should be *very* simple and *not* be part of the database state. - instead, a LIBEUFIN_SANDBOX_ADMIN_TOKEN environment variable will be used to - set the authentication. - - - All sandbox will require the ADMIN_TOKEN, except: - - the /ebicsweb endpoint, because EBICS handles authentication here - (EBICS subscribers are checked) - - the /demobank(/...) endpoints (except registration and public accounts), - because authentication is handled by checking the demobank user credentials - */ - package tech.libeufin.sandbox import UtilError