repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -7,14 +7,14 @@ # This example configuration can be used for Keycloak. # enable/disable OIDC login (backend functionality - separately enable/disable in frontend)
the comment seems to be not relevant anymore, maybe it can be removed
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -7,14 +7,14 @@ # This example configuration can be used for Keycloak. # enable/disable OIDC login (backend functionality - separately enable/disable in frontend) -enableOidcLogin = true +publicBaseUrl = "http://localhost:7101"
this might be confusing as it refers to frontend, maybe different naming can avoid it, e.g. clientBaseUrl?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -28,14 +28,6 @@ data: --- apiVersion: v1 kind: ConfigMap -metadata: - name: wallet-wallet-config -data: - wallet.conf: | - remoteWallet = "https://walletkit.walt-test.cloud" ---- -apiVersion: v1 -kind: ConfigMap metadata: name: wallet-web-config data:
`publicBaseUrl` seems unnecessary
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -28,14 +28,6 @@ data: ---
database config seems not updated (still split into 2 files)
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -33,7 +33,6 @@ metadata: name: wallet-oidc-config data: oidc.conf: |
same as for dev and portal - db and web configs not updated
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,54 @@ +package id.walt.webwallet + +import id.walt.commons.featureflag.BaseFeature +import id.walt.commons.featureflag.OptionalFeature +import id.walt.commons.featureflag.ServiceFeatureCatalog +import id.walt.webwallet.config.* + +object FeatureCatalog : ServiceFeatureCatalog { + + val databaseFeature = B...
please remove commented code
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,54 @@ +package id.walt.webwallet + +import id.walt.commons.featureflag.BaseFeature +import id.walt.commons.featureflag.OptionalFeature +import id.walt.commons.featureflag.ServiceFeatureCatalog +import id.walt.webwallet.config.* + +object FeatureCatalog : ServiceFeatureCatalog { + + val databaseFeature = B...
potentially, these can be private
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -1,59 +1,38 @@ package id.walt.webwallet +import id.walt.commons.ServiceConfiguration +import id.walt.commons.ServiceInitialization +import id.walt.commons.ServiceMain import id.walt.crypto.keys.oci.WaltCryptoOci import id.walt.did.helpers.WaltidServices -import id.walt.webwallet.config.ConfigManager -import id...
maybe this can be renamed to `logger`?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -1,20 +1,12 @@ package id.walt.webwallet.config -import com.sksamuel.hoplite.* -import io.github.oshai.kotlinlogging.KotlinLogging -import io.ktor.server.plugins.* -import kotlinx.serialization.Serializable -import kotlinx.serialization.json.Json -import kotlinx.serialization.json.encodeToJsonElement -import kotl...
please clean up this file
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -1,35 +1,31 @@ package id.walt.webwallet.config import id.walt.webwallet.db.Db -import id.walt.webwallet.db.SerializableHikariConfiguration import io.github.oshai.kotlinlogging.KotlinLogging import kotlinx.serialization.Serializable import kotlin.io.path.Path import kotlin.io.path.createParentDirectories im...
since the file has been worked on, maybe rename this to `logger`?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -1,9 +1,11 @@ package id.walt.webwallet.config +/*
is this file required anymore? maybe it can be removed?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -1,5 +1,6 @@ package id.walt.webwallet.config +/*
can it be removed, or maybe it should be uncommented?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -4,7 +4,7 @@ import kotlinx.serialization.Serializable @Serializable data class OidcConfiguration( - val enableOidcLogin: Boolean, + val publicBaseUrl: String = "http://localhost:7101",
same as for [oidc.conf](waltid-services/waltid-wallet-api/config/oidc.conf), maybe it can renamed to `clientBaseUrl` to avoid any potential confusion?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -6,16 +6,18 @@ import kotlinx.serialization.json.* @Serializable data class RegistrationDefaultsConfig( - private val defaultKeyConfig: JsonObject = buildJsonObject { + val defaultKeyConfig: KeyGenerationRequest = KeyGenerationRequest(), + /*
please remove commented code
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -6,16 +6,18 @@ import kotlinx.serialization.json.* @Serializable data class RegistrationDefaultsConfig( - private val defaultKeyConfig: JsonObject = buildJsonObject { + val defaultKeyConfig: KeyGenerationRequest = KeyGenerationRequest(), + /* + : JsonObject = buildJsonObject { put("backend",...
shouldn't there be a typed class similar to `defaultKeyConfig`, so the implementation is consistent?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -2,7 +2,7 @@ package id.walt.webwallet.service.nft import id.walt.nftkit.services.* import id.walt.webwallet.config.ChainExplorerConfiguration -import id.walt.webwallet.config.ConfigManager +import id.walt.config.ConfigManager
is it the right import? it's probably missing `commons`
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,26 @@ +dataSource {
as mentioned for [breaking-changes](https://github.com/walt-id/waltid-identity/pull/454/files#r1631001528), this will break the utility in docker-compose to easily switch db engines
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,155 @@ +package id.walt.commons.featureflag + +import id.walt.commons.config.ConfigManager +import id.walt.commons.config.runconfig.RunConfiguration +import io.klogging.noCoLogger + +object FeatureManager { + val baseFeatures = HashSet<String>() + val enabledFeatures = HashSet<String>() + val disabl...
maybe this can be renamed to `logger`?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,133 @@ +package id.walt.commons.config + +import com.sksamuel.hoplite.* +import io.klogging.java.LoggerFactory +import java.util.concurrent.ConcurrentLinkedQueue +import kotlin.reflect.KClass +import kotlin.reflect.jvm.jvmName + +typealias WaltConfig = Any + +object ConfigManager { + + val log = LoggerFac...
maybe this can be renamed to `logger` and be private?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,133 @@ +package id.walt.commons.config + +import com.sksamuel.hoplite.* +import io.klogging.java.LoggerFactory +import java.util.concurrent.ConcurrentLinkedQueue +import kotlin.reflect.KClass +import kotlin.reflect.jvm.jvmName + +typealias WaltConfig = Any + +object ConfigManager { + + val log = LoggerFac...
is it still relevant, seems it has no references?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,133 @@ +package id.walt.commons.config + +import com.sksamuel.hoplite.* +import io.klogging.java.LoggerFactory +import java.util.concurrent.ConcurrentLinkedQueue +import kotlin.reflect.KClass +import kotlin.reflect.jvm.jvmName + +typealias WaltConfig = Any + +object ConfigManager { + + val log = LoggerFac...
please remove commented code
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,155 @@ +package id.walt.commons.featureflag + +import id.walt.commons.config.ConfigManager +import id.walt.commons.config.runconfig.RunConfiguration +import io.klogging.noCoLogger + +object FeatureManager { + val baseFeatures = HashSet<String>()
seems to not have any references, is it still required?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,155 @@ +package id.walt.commons.featureflag + +import id.walt.commons.config.ConfigManager +import id.walt.commons.config.runconfig.RunConfiguration +import io.klogging.noCoLogger + +object FeatureManager { + val baseFeatures = HashSet<String>() + val enabledFeatures = HashSet<String>() + val disabl...
`registerFeature` can be private
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,155 @@ +package id.walt.commons.featureflag + +import id.walt.commons.config.ConfigManager +import id.walt.commons.config.runconfig.RunConfiguration +import io.klogging.noCoLogger + +object FeatureManager { + val baseFeatures = HashSet<String>() + val enabledFeatures = HashSet<String>() + val disabl...
maybe also private?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,155 @@ +package id.walt.commons.featureflag + +import id.walt.commons.config.ConfigManager +import id.walt.commons.config.runconfig.RunConfiguration +import io.klogging.noCoLogger + +object FeatureManager { + val baseFeatures = HashSet<String>() + val enabledFeatures = HashSet<String>() + val disabl...
can it be private?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,33 @@ +package id.walt.commons.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.parameters.options.option +import com.github.ajalt.clikt.parameters.types.choice +import id.walt.commons.ServiceCommons +import id.walt.commons.ServiceConfiguration +import id.walt.common...
`logType` seems to be unused
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -92,13 +94,14 @@ We are working on fixing this issue. #### Updating ports doesn't work Make sure the ports are also updated in: + - Caddyfile - issuer-api/config - - issuer-service.conf - - web.conf + - issuer-service.conf + - web.conf - verifier-api/config - - verifier-service.conf - - web.conf + ...
I think it should be point to the unified `db.conf` now
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -1,4 +1,4 @@ -supportedCredentialTypes=""" +supportedCredentialTypes = """
shouldn't this config also have the updated structure?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -52,10 +52,10 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0") //implement...
is it left on purpose or maybe it's a leftover?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -49,13 +48,14 @@ kotlin { val testEngine = mapOf( "chromium" to { useChromiumHeadless() }, - "chrome" to { useChromeHeadless() }, + "firefox" to { useFirefoxHeadless() }, "/Applications/Google Chrom...
is the log needed at all?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -22,7 +22,7 @@ class PresentationDefinitionPolicy : CredentialWrapperValidatorPolicy( data.jsonObject["vp"]!!.jsonObject["verifiableCredential"]?.jsonArray?.mapNotNull { it.jsonPrimitive.contentOrNull?.decodeJws()?.payload ?.jsonObject?.get("vc")?.jsonObject?.get("t...
can't this return a list containing null elements?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -9,9 +9,9 @@ import com.webauthn4j.data.client.Origin import com.webauthn4j.data.client.challenge.Challenge import com.webauthn4j.data.client.challenge.DefaultChallenge import com.webauthn4j.server.ServerProperty -import com.webauthn4j.validator.exception.ValidationException - +import com.webauthn4j.validator.exc...
maybe it is good to have an issue on github, so it doesn't get lost or forgotten?
waltid-identity
github_2023
others
454
walt-id
mikeplotean
@@ -0,0 +1,227 @@ +-- ---------------------------------- +-- Emails table
since there's no migration, maybe these migration files can also be removed?
waltid-identity
github_2023
others
273
walt-id
philpotisk
@@ -14,6 +14,13 @@ class OidcTest { ConfigManager.loadConfigs(emptyArray()) val ciTestProvider = CIProvider() +// println("Aaaaaaaaa")
please remove commented code
waltid-identity
github_2023
others
273
walt-id
philpotisk
@@ -44,7 +44,7 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
why is this dependency downgraded?
waltid-identity
github_2023
others
273
walt-id
philpotisk
@@ -370,4 +411,12 @@ open class CIProvider : OpenIDCredentialIssuer( println("SWAPPING PRE-MAPPED VC FROM SESSION ID TO NEW TOKEN: $token") tokenCredentialMapping[token] = premappedVc } + + fun mapSessionIdToIdAuthRequestState(sessionId: String, token: String) { + println("MAPPING SESSI...
introduce a logger and not use println in production code
waltid-identity
github_2023
others
273
walt-id
severinstampler
@@ -108,14 +128,25 @@ open class CIProvider : OpenIDCredentialIssuer( return authSessions.remove(id) } + // ------------------------------------------ // Simple cryptographics operation interface implementations - override fun signToken(target: TokenTarget, payload: JsonObject, header: Json...
Why do we need to pass a private key as JWK string here?
waltid-identity
github_2023
others
273
walt-id
severinstampler
@@ -0,0 +1,161 @@ +package id.walt.oid4vc + +import id.walt.oid4vc.data.CredentialOffer +import id.walt.oid4vc.data.GrantType +import id.walt.oid4vc.data.OfferedCredential +import id.walt.oid4vc.data.OpenIDProviderMetadata +import id.walt.oid4vc.definitions.CROSS_DEVICE_CREDENTIAL_OFFER_URL +import id.walt.oid4vc.defin...
What's all this commented code?
waltid-identity
github_2023
others
273
walt-id
severinstampler
@@ -66,19 +67,57 @@ object OidcApi : CIProvider() { post("/par") { val authReq = AuthorizationRequest.fromHttpParameters(call.receiveParameters().toMap()) try { - val session = initializeAuthorization(authReq, 5.minutes) + val session ...
I don't think this is correct or a good approach. I don't understand why the key ID is here the DID identifier with the prefix removed, and not the actual key ID, from which the CIProvider can derive the required key and load it from it's internal key store, so that passing the private key as JWK is not required. The ...
waltid-identity
github_2023
others
331
walt-id
taminobaumann
@@ -0,0 +1,49 @@ +# Contributing to the Waltid Community Stack + +We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: + +- Reporting a bug +- Discussing the current state of the code +- Submitting a fix +- Proposing new features +- Becoming a maintainer + ...
we are using `main` instaed of `master`
waltid-identity
github_2023
others
412
walt-id
mikeplotean
@@ -1,7 +1,6 @@ package id.walt.webwallet.utils import id.walt.crypto.utils.JsonUtils.toJsonElement -import kotlinx.serialization.ExperimentalSerializationApi
is it ok to use experimental api's (we do use them for libs, but still)? cc @philpotisk @taminobaumann
waltid-identity
github_2023
others
461
walt-id
mikeplotean
@@ -0,0 +1,48 @@ +name: Docker compose test + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Deploy Fedora Pod + uses: actions-hub/kubectl@master + env: + ...
I think the test script has been renamed to `api-test.py`
waltid-identity
github_2023
others
461
walt-id
mikeplotean
@@ -0,0 +1,48 @@ +name: Docker compose test + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Deploy Fedora Pod + uses: actions-hub/kubectl@master + env: + ...
maybe this commented code can be removed?
waltid-identity
github_2023
python
461
walt-id
mikeplotean
@@ -0,0 +1,79 @@ +import requests +import unittest +import random +import string +import json + +class WalletAPITest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.wallet_url = "http://localhost:7001" + cls.headers = {"Content-Type": "application/json" } + cls.name = ''.joi...
wouldn't it be better to use json.dumps? e.g. ``` json.dumps({"backend":"jwl","keyType":"Ed25519"}) ``` because otherwise it throws: ``` Caused by: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 2: Encountered an unknown key ''backend'' at path: $ Use 'ignoreUnknow...
waltid-identity
github_2023
others
461
walt-id
mikeplotean
@@ -0,0 +1,48 @@ +name: Docker compose test + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Deploy Fedora Pod + uses: actions-hub/kubectl@master + env: + ...
doesn't this wait only for the host container to get started (not the docker-compose stack)?
waltid-identity
github_2023
python
461
walt-id
mikeplotean
@@ -0,0 +1,79 @@ +import requests +import unittest +import random +import string +import json + +class WalletAPITest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.wallet_url = "http://localhost:7001" + cls.headers = {"Content-Type": "application/json" } + cls.name = ''.joi...
I'd rather randomize the email than the name
waltid-identity
github_2023
others
364
walt-id
waltkb
@@ -129,4 +131,24 @@ object Db { "TRANSACTION_SERIALIZABLE" -> Connection.TRANSACTION_SERIALIZABLE else -> Connection.TRANSACTION_SERIALIZABLE } + + private fun createHikariDataSource(json: JsonObject) = HikariDataSource(HikariConfig().apply {
Avoid non-typed arguments, as these here with the variable names as string
waltid-identity
github_2023
others
364
walt-id
waltkb
@@ -440,40 +440,14 @@ class SSIKit2WalletService( ) } - private val ociRestApiKeyMetadata by lazy { - ConfigManager.getConfig<OciRestApiKeyConfig>().let { - mapOf(
Good that this is replaced
waltid-identity
github_2023
others
364
walt-id
waltkb
@@ -40,29 +35,23 @@ class E2EWalletTestLocal : E2EWalletTestBase() { companion object { init { - WalletConfigManager.preloadConfig("db.sqlite", DatasourceJsonConfiguration( - hikariDataSource = mapOf( - "jdbcUrl" to "jdbc:sqlite:data/wallet.db" - ...
Avoid non-typed arguments, as these here with the variable names as string
waltid-identity
github_2023
others
340
walt-id
mikeplotean
@@ -474,14 +477,14 @@ suspend fun verifyToken(token: String): Result<String> { suspend fun PipelineContext<Unit, ApplicationCall>.doLogin() { val reqBody = loginRequestJson.decodeFromString<AccountRequest>(call.receive()) AccountsService.authenticate("", reqBody) - .onSuccess { // FIXME -> TENANT HERE...
since this is becoming a more complex object, maybe have a serializable data class?
waltid-identity
github_2023
others
362
walt-id
mikeplotean
@@ -215,6 +215,10 @@ spec: mountPath: "/waltid-wallet-api/config/oci.conf" subPath: "oci.conf" readOnly: true + - name: wallet-oci-rest-api-secret + mountPath: "/waltid-wallet-api/config/oci-rest-api.conf" + subPath: "oci.conf"
I think subPath should be `oci-rest-api.conf`
waltid-identity
github_2023
others
362
walt-id
mikeplotean
@@ -455,8 +440,8 @@ class SSIKit2WalletService( ) } - private val ociKeyMetadata by lazy { - ConfigManager.getConfig<OciKeyConfig>().let { + private val ociRestApiKeyMetadata by lazy { + ConfigManager.getConfig<OciRestApiKeyConfig>().let { mapOf(
shouldn't this map contain all `OciRestApiKeyConfig` fields?
waltid-identity
github_2023
others
362
walt-id
mikeplotean
@@ -262,6 +266,9 @@ spec: - name: wallet-oci-secret
may I suggest to add a config-map for wallet-oci-secret (perhaps have it renamed to wallet-oci-config) here, as it doesn't contain any secrets anymore?
waltid-identity
github_2023
others
362
walt-id
mikeplotean
@@ -229,34 +228,35 @@ actual class OCIKey actual constructor( } actual suspend fun generateKey(config: OCIsdkMetadata): OCIKey { - val provider = InstancePrincipalsAuthenticationDetailsProvider.builder().build() - val kmsVaultClient = KmsVaultClient.builder().build(provider) - ...
wouldn't this create a new key every time it fails to retrieve the public-key? also, if it takes longer than 3 retries for a key to transition from creating to created, it will also fail maybe an option would be a retry based on delay instead of counts, so if it fails retry after some time (<<2s) and fail only when...
waltid-identity
github_2023
others
362
walt-id
mikeplotean
@@ -286,3 +296,31 @@ actual class OCIKey actual constructor( } +@ExperimentalTime +private suspend fun <T> retry( + maxDuration: Duration = Duration.ofSeconds(2), + retryInterval: Duration = Duration.ofMillis(100), + block: suspend () -> T +): T { + var result: Result<T> + var totalDuration = Durati...
hm..I was thinking about adding up time waited for, but this also works since the execution time is also part of it, maybe worth specifying a bigger number as maxDuration?
waltid-identity
github_2023
others
97
walt-id
waltkb
@@ -46,6 +54,28 @@ kotlin { } sourceSets { + val androidMain by getting { + dependencies { + // Multibase + implementation("com.github.multiformats:java-multibase:v1.1.1")
this is no longer required with the newest main branch
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
Do not have static message string, automatically generate (from `PolicyManager.listPolicyDescriptions()`)
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
generate automatically with PolicyManager, see above
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
Generate automatically, see above
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
It's fine if policy is not applied (when it's not available, that is `policy_available = false`)
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
Not a bug, simply not all credentials have "not before" or similar set
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
result.exception is always null if result.isSuccess (see kotlin.Result internal implementation)
waltid-identity
github_2023
others
280
walt-id
waltkb
@@ -0,0 +1,218 @@ +package id.walt.cli.commands + +import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context +import com.github.ajalt.clikt.core.FileNotFound +import com.github.ajalt.clikt.core.MissingOption +import com.github.ajalt.clikt.parameters.arguments.argument +import com.githu...
if you checked .isSuccess previously, you can use getOrThrow(); also, don't check against Unit
waltid-identity
github_2023
others
253
walt-id
SuperBatata
@@ -13,34 +13,36 @@ Manage keys, DIDs, issue Verifiable Credentials, and verify them using the WaltI Now, you can run: -| Command | What it does ...
maybe make it same as the other generate key command ex : waltid key generate --keyType=secp256k1
waltid-identity
github_2023
others
265
walt-id
waltkb
@@ -0,0 +1,2 @@ +url = "<webhook>"
Have you checked that this doesn't break the web wallet? (It does not use push if it's now configured, but this would make it configured now)
waltid-identity
github_2023
others
265
walt-id
waltkb
@@ -0,0 +1,4 @@ +encryptionKey = "<128 bit -- key>" // a 128 bit (16 chars) key +signKey = "<128 bit -- key>" // a 128 bit (16 chars) key
Should we make the default more secure? Like this: ```hocon encryptionKey = ${random.string(16)} signKey = ${random.string(16)} tokenKey = ${random.string(32)} ``` (this would break multi-instance deployments though, they would have to override it for that)
waltid-identity
github_2023
others
252
walt-id
mikeplotean
@@ -486,21 +490,46 @@ class SSIKit2WalletService( keysetHandle = JsonNull ) } - - + val config = ConfigManager.getConfig<OciKeyConfig>() + private val ociKeyMetadata = mapOf( + "tenancyOcid" to config.tenancyOcid, + "userOcid" to config.userOcid, + "fing...
looks like duplicated code, please check
waltid-identity
github_2023
others
252
walt-id
mikeplotean
@@ -463,15 +463,26 @@ suspend fun PipelineContext<Unit, ApplicationCall>.doLogin() { sign(MACSigner(AuthKeys.tokenKey)) }.serialize() + call.sessions.set(LoginTokenSession(token)) call.response.status(HttpStatusCode.OK) - call.respond( - ...
looks like duplicated code, please check
waltid-identity
github_2023
others
252
walt-id
mikeplotean
@@ -138,7 +138,7 @@ object KeycloakAccountStrategy : PasswordAccountStrategy<KeycloakAccountRequest> override suspend fun authenticate( tenant: String, request: KeycloakAccountRequest - ): AuthenticatedUser { + ): KeycloakAuthenticatedUser {
please fix this leftover, it should return `AuthenticatedUser`
waltid-identity
github_2023
others
252
walt-id
mikeplotean
@@ -134,9 +134,9 @@ const currentWallet = useCurrentWallet() async function generateKey() { - if (Object.keys(data.keyGenerationRequest.config).length !== options.value.find(option => option.keyGenerationRequest[1] == data.keyGenerationRequest.type)?.config?.length) { - return alert("Please fill all fields"); ...
maybe cleanup the commented code
waltid-identity
github_2023
others
234
walt-id
philpotisk
@@ -34,6 +34,13 @@ object OIDCVerifierService : OpenIDCredentialVerifier( val specificPolicies: Map<String, List<PolicyRequest>>, val successRedirectUri: String?, val errorRedirectUri: String?, + val statusCallback: StatusCallback? = null, + ) + + data class StatusCallback( + ...
remove
waltid-identity
github_2023
others
234
walt-id
philpotisk
@@ -0,0 +1,149 @@ +package id.walt.verifier.oidc + +import id.walt.credentials.verification.models.PolicyRequest +import id.walt.credentials.verification.models.PolicyRequest.Companion.parsePolicyRequests +import id.walt.credentials.verification.policies.JwtSignaturePolicy +import id.walt.oid4vc.data.ResponseMode +impo...
replace with logger
waltid-identity
github_2023
others
234
walt-id
waltkb
@@ -0,0 +1,154 @@ +package id.walt.verifier.oidc + +import id.walt.credentials.verification.models.PolicyRequest +import id.walt.credentials.verification.models.PolicyRequest.Companion.parsePolicyRequests +import id.walt.credentials.verification.policies.JwtSignaturePolicy +import id.walt.oid4vc.data.ResponseMode +impo...
What about actually POSTing the verification result itself instead if having `Verifier --notify--> Client --request--> Verifier --respond--> Client`?
waltid-identity
github_2023
others
215
walt-id
philpotisk
@@ -6,45 +6,85 @@ import com.github.ajalt.mordant.rendering.TextColors import com.github.ajalt.mordant.rendering.Whitespace import com.github.ajalt.mordant.widgets.Panel import com.github.ajalt.mordant.widgets.Text -import kotlin.system.exitProcess + +fun t(args: Array<String>) { + println("T() Function: $args.to...
remove plz
waltid-identity
github_2023
others
215
walt-id
philpotisk
@@ -6,45 +6,85 @@ import com.github.ajalt.mordant.rendering.TextColors import com.github.ajalt.mordant.rendering.Whitespace import com.github.ajalt.mordant.widgets.Panel import com.github.ajalt.mordant.widgets.Text -import kotlin.system.exitProcess + +fun t(args: Array<String>) { + println("T() Function: $args.to...
also this commented code should be removed
waltid-identity
github_2023
others
178
walt-id
mikeplotean
@@ -0,0 +1,454 @@ +package id.walt.crypto.keys + +import id.walt.crypto.utils.Base64Utils.base64UrlDecode +import id.walt.crypto.utils.Base64Utils.base64toBase64Url +import id.walt.crypto.utils.Base64Utils.encodeToBase64Url +import id.walt.crypto.utils.JwsUtils.jwsAlg +import io.ktor.client.* +import io.ktor.client.cal...
can skip this, as it is already handled by the `else` branch
waltid-identity
github_2023
others
178
walt-id
mikeplotean
@@ -0,0 +1,454 @@ +package id.walt.crypto.keys + +import id.walt.crypto.utils.Base64Utils.base64UrlDecode +import id.walt.crypto.utils.Base64Utils.base64toBase64Url +import id.walt.crypto.utils.Base64Utils.encodeToBase64Url +import id.walt.crypto.utils.JwsUtils.jwsAlg +import io.ktor.client.* +import io.ktor.client.cal...
I wonder, can't this be a constant? saw it a couple of times already before
waltid-identity
github_2023
others
178
walt-id
mikeplotean
@@ -0,0 +1,454 @@ +package id.walt.crypto.keys + +import id.walt.crypto.utils.Base64Utils.base64UrlDecode +import id.walt.crypto.utils.Base64Utils.base64toBase64Url +import id.walt.crypto.utils.Base64Utils.encodeToBase64Url +import id.walt.crypto.utils.JwsUtils.jwsAlg +import io.ktor.client.* +import io.ktor.client.cal...
maybe consider having a method for this (thus avoiding duplicates)
waltid-identity
github_2023
others
227
walt-id
mikeplotean
@@ -62,388 +61,455 @@ data class LoginTokenSession(val token: String) : Principal data class OidcTokenSession(val token: String) : Principal object AuthKeys { - private val secureRandom = SecureRandom + private val secureRandom = SecureRandom - // TODO make statically configurable for HA deployments - v...
I'd avoid using print-stack-trace maybe `logger.error { it.stackTraceToString() }`?
waltid-identity
github_2023
others
227
walt-id
mikeplotean
@@ -111,78 +126,132 @@ object KeycloakAccountStrategy : AccountStrategy<KeycloakAccountRequest>("keyclo "ES512" -> Algorithm.ECDSA512(publicKey as ECPublicKey, null) null -> Algorithm.RSA256(publicKey as RSAPublicKey, null) else -> throw IllegalArgumentException("Unsupported algorithm $algori...
maybe have this `private`, as the ide suggests
waltid-identity
github_2023
others
227
walt-id
mikeplotean
@@ -29,80 +31,93 @@ import kotlinx.uuid.UUID import kotlinx.uuid.generateUUID import org.jetbrains.exposed.sql.insert import org.jetbrains.exposed.sql.transactions.transaction -import java.security.interfaces.ECPublicKey -import java.security.interfaces.RSAPublicKey object KeycloakAccountStrategy : AccountStrateg...
maybe have this `private` instead of `internal` (as the ide suggests)
waltid-identity
github_2023
others
213
walt-id
mikeplotean
@@ -32,327 +31,440 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.sessions.* import io.ktor.util.pipeline.* +import kotlin.collections.set +import kotlin.time.Duration.Companion.days +import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject impo...
not sure how much sense does this example make here maybe it can be removed
waltid-identity
github_2023
others
213
walt-id
mikeplotean
@@ -32,327 +31,440 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.sessions.* import io.ktor.util.pipeline.* +import kotlin.collections.set +import kotlin.time.Duration.Companion.days +import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject impo...
perhaps just 'Login with [username + password]
waltid-identity
github_2023
others
213
walt-id
mikeplotean
@@ -32,327 +31,440 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.sessions.* import io.ktor.util.pipeline.* +import kotlin.collections.set +import kotlin.time.Duration.Companion.days +import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject impo...
~~shouldn't it be `userId`?~~
waltid-identity
github_2023
others
213
walt-id
mikeplotean
@@ -32,327 +31,440 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.sessions.* import io.ktor.util.pipeline.* +import kotlin.collections.set +import kotlin.time.Duration.Companion.days +import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject impo...
~~shouldn't it be `userId`?~~
waltid-identity
github_2023
others
213
walt-id
mikeplotean
@@ -32,327 +31,440 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.sessions.* import io.ktor.util.pipeline.* +import kotlin.collections.set +import kotlin.time.Duration.Companion.days +import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject impo...
perhaps `keycloakUserId`?
waltid-identity
github_2023
others
189
walt-id
philpotisk
@@ -3,32 +3,39 @@ package id.walt.webwallet.service.report import id.walt.webwallet.db.models.Events import id.walt.webwallet.db.models.WalletCredential import id.walt.webwallet.service.credentials.CredentialsService +import id.walt.webwallet.service.events.CredentialEventData import id.walt.webwallet.service.event...
Remove commented code
waltid-identity
github_2023
others
189
walt-id
philpotisk
@@ -8,13 +8,12 @@ object WalletCredentialCategoryMap : Table("credential_category") { val wallet = kotlinxUUID("wallet") //TODO: what if the [id] column in credentials table gets updated?
who could answer this? let's find a solution and fix this TODO
waltid-identity
github_2023
others
189
walt-id
philpotisk
@@ -173,6 +174,8 @@ class WalletKitWalletService(tenant: String, accountId: UUID, walletId: UUID) : override suspend fun attachCategory(credentialId: String, categories: List<String>): Boolean = throw NotImplementedError("") override suspend fun detachCategory(credentialId: String, categories: List<String>)...
Use IntelliJ formatter to have everywhere the same line breaks
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -80,24 +70,44 @@ object Db { OidcLogins, WalletSettings, ).toTypedArray() - + + fun recreateDatabase() { transaction { addLogger(StdOutSqlLogger) - - + + SchemaUtils.drop(*(tables.reversedArray())) SchemaUtils...
if an account is registered before creating a default issuer, then on registration, the account won't get assigned a default issuer until we get a proper db migration in place, I'd suggest to add the issuer first
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -49,11 +49,7 @@ class TestCredentialWallet( private val sessionCache = mutableMapOf<String, VPresentationSession>() // TODO not stateless because of oidc4vc library - private val ktorClient = HttpClient(CIO) { - install(io.ktor.client.plugins.contentnegotiation.ContentNegotiation) { - j...
~~maybe it can be injected in constructor~~
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -346,24 +333,15 @@ class SSIKit2WalletService( private val testCIClientConfig = OpenIDClientConfig("test-client", null, redirectUri = "http://blank") - val http = HttpClient(Java) { - install(ContentNegotiation) { - json() - } - install(Logging) { - logger = Log...
maybe it can be injected in constructor
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -0,0 +1,25 @@ +package id.walt.webwallet.utils + +import io.ktor.client.* +import io.ktor.client.plugins.contentnegotiation.* +import io.ktor.client.plugins.logging.* +import io.ktor.serialization.kotlinx.json.* + +object WalletHttpClients { + + var defaultMethod = { + HttpClient() { + install(C...
I think it can invoked the regular way: `defaultMethod()`
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -0,0 +1,144 @@ +import io.ktor.client.* +import io.ktor.client.plugins.* +import io.ktor.client.plugins.contentnegotiation.* +import io.ktor.client.plugins.logging.* +import io.ktor.client.request.* +import io.ktor.serialization.kotlinx.json.* +import kotlinx.coroutines.test.runTest +import kotlin.test.* +import kot...
maybe the commented code can be removed
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -0,0 +1,227 @@ +import com.zaxxer.hikari.HikariConfig +import com.zaxxer.hikari.HikariDataSource +import id.walt.issuer.base.config.OIDCIssuerServiceConfig +import id.walt.issuer.issuerModule +import id.walt.verifier.verifierModule +import id.walt.webwallet.config.DatasourceConfiguration +import id.walt.webwallet.db...
this looks similar to `newClient` from `E2EWalletTestDeployed` since they both inherit `E2EWalletTestBase`, maybe it can also host a `protected newClient`
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -0,0 +1 @@ +data class User(val name: String, val email: String, val password: String, val accountType: String) {}
I think the brackets can be removed
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -0,0 +1,114 @@ +<div align="center"> + <h1>Ktor e2e Test Framework</h1> + <p>Automates the Testing of all <b>Walt.Id</b> Rest API endpoints and use cases.<p> + +<a href="https://walt.id/community"> +<img src="https://img.shields.io/badge/Join-The Community-blue.svg?style=flat" alt="Join community!" /> +</a> +<a href...
typo 'Issues a jtw credential'
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -80,24 +70,44 @@ object Db { OidcLogins, WalletSettings, ).toTypedArray() - + + fun recreateDatabase() { transaction { addLogger(StdOutSqlLogger) - - + + SchemaUtils.drop(*(tables.reversedArray())) SchemaUtils...
this seems related to testing, maybe it can be moved to `setupTestWebWallet` or somewhere similar
waltid-identity
github_2023
others
194
walt-id
mikeplotean
@@ -8,5 +8,5 @@ data class DatabaseConfiguration( data class DatasourceConfiguration( val hikariDataSource: HikariDataSource, - val recreateDatabaseOnStart: Boolean = false + var recreateDatabaseOnStart: Boolean = false
I think this can be `val`, since `E2EWalletTestLocal.init` instantiates the whole object
waltid-identity
github_2023
others
148
walt-id
waltkb
@@ -6,7 +6,7 @@ <script value="dev" /> </scripts> <node-interpreter value="project" /> - <package-manager value="/usr/bin/bun" /> + <package-manager value="/usr/local/bin/bun" />
Usually any of ``` /sbin/bun /bin/bun /usr/bin/bun /usr/sbin/bun ```