Skip to content

Commit

Permalink
[INJIMOB-2324]: Adding 3 sec tolerance to dates in Mdoc Validator. (#59)
Browse files Browse the repository at this point in the history
* [INJIMOB-2324]: Adding 3 sec tolerance to dates in Mdoc Validator.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Combine future extension methos into single method and test cases updated.

Signed-off-by: BalachandarG <[email protected]>

* [INJIMOB-2324]: Hanlding tolerance in validFrom date of Data Model 2.0

Signed-off-by: BalachandarG <[email protected]>

---------

Signed-off-by: BalachandarG <[email protected]>
  • Loading branch information
balachandarg-tw authored Nov 28, 2024
1 parent 93eb64e commit 210834a
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ object CredentialValidatorConstants {
const val ERROR_MESSAGE_NAME = "${VALIDATION_ERROR}name should be string or array of Language Object"
const val ERROR_MESSAGE_DESCRIPTION = "${VALIDATION_ERROR}description should be string or array of Language Object"

const val ERROR_MESSAGE_INVALID_VALID_FROM_MSO = "invalid validFrom in the MSO of the credential"
const val ERROR_CODE_INVALID_VALID_FROM_MSO = "${ERROR_CODE_INVALID}VALID_FROM_MSO"
const val ERROR_MESSAGE_INVALID_VALID_UNTIL_MSO = "invalid validUntil in the MSO of the credential"
const val ERROR_CODE_INVALID_VALID_UNTIL_MSO = "${ERROR_CODE_INVALID}VALID_UNTIL_MSO"
const val ERROR_MESSAGE_INVALID_DATE_MSO = "invalid validUntil / validFrom in the MSO of the credential"
const val ERROR_CODE_INVALID_DATE_MSO = "${ERROR_CODE_INVALID}DATE_MSO"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ import co.nstant.`in`.cbor.model.MajorType
import co.nstant.`in`.cbor.model.Map
import co.nstant.`in`.cbor.model.UnicodeString
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_CODE_INVALID_DATE_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_CODE_INVALID_VALID_FROM_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_CODE_INVALID_VALID_UNTIL_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_MESSAGE_INVALID_DATE_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_MESSAGE_INVALID_VALID_FROM_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_MESSAGE_INVALID_VALID_UNTIL_MSO
import io.mosip.vercred.vcverifier.credentialverifier.types.msomdoc.MsoMdocVerifiableCredential
import io.mosip.vercred.vcverifier.credentialverifier.types.msomdoc.extractMso
import io.mosip.vercred.vcverifier.exception.UnknownException
import io.mosip.vercred.vcverifier.exception.ValidationException
import io.mosip.vercred.vcverifier.utils.DateUtils
import io.mosip.vercred.vcverifier.utils.DateUtils.parseDate
import java.util.logging.Logger

class MsoMdocValidator {
Expand All @@ -33,18 +38,29 @@ class MsoMdocValidator {
logger.severe("validUntil / validFrom is not available in the credential's MSO")
throw ValidationException(ERROR_MESSAGE_INVALID_DATE_MSO, ERROR_CODE_INVALID_DATE_MSO)
}
val isCurrentTimeGreaterThanValidFrom =
DateUtils.isDatePassedCurrentDate(validFrom.toString())
val isCurrentTimeLessThanValidUntil =
!DateUtils.isDatePassedCurrentDate(validUntil.toString())
val isValidFromIsFutureDate =
DateUtils.isFutureDateWithTolerance(validFrom.toString())
val isValidUntilIsPastDate =
!DateUtils.isFutureDateWithTolerance(validUntil.toString())
val isValidUntilGreaterThanValidFrom: Boolean =
DateUtils.parseDate(validUntil.toString())?.after(
DateUtils.parseDate(
parseDate(validUntil.toString())?.after(
parseDate(
validFrom.toString()
) ?: return false
) ?: false
if (!(isCurrentTimeLessThanValidUntil && isCurrentTimeGreaterThanValidFrom && isValidUntilGreaterThanValidFrom)) {
logger.severe("Error while doing validity verification - invalid validUntil / validFrom in the MSO of the credential")

if(isValidFromIsFutureDate){
logger.severe("Error while doing validity verification - invalid validFrom in the MSO of the credential")
throw ValidationException(ERROR_MESSAGE_INVALID_VALID_FROM_MSO, ERROR_CODE_INVALID_VALID_FROM_MSO)
}

if(isValidUntilIsPastDate){
logger.severe("Error while doing validity verification - invalid validUntil in the MSO of the credential")
throw ValidationException(ERROR_MESSAGE_INVALID_VALID_UNTIL_MSO, ERROR_CODE_INVALID_VALID_UNTIL_MSO)
}

if(!isValidUntilGreaterThanValidFrom){
logger.severe("Error while doing validity verification - invalid validFrom / validUntil in the MSO of the credential")
throw ValidationException(ERROR_MESSAGE_INVALID_DATE_MSO, ERROR_CODE_INVALID_DATE_MSO)
}
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object DateUtils {

private val logger = Logger.getLogger(DateUtils::class.java.name)

private val dateFormats = listOf(
val dateFormats = listOf(
("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),
("yyyy-MM-dd'T'HH:mm:ss'Z'")
)
Expand All @@ -38,22 +38,6 @@ object DateUtils {
return DATE_REGEX.matches(dateValue)
}

fun isDatePassedCurrentDate(inputDateString: String): Boolean {
return try {
val inputDate: Date? = parseDate(inputDateString)
if (inputDate == null) {
logger.severe("Given date is not available in supported date formats")
return false
}

val currentDate = Calendar.getInstance(TimeZone.getTimeZone(UTC)).time
inputDate.before(currentDate)
} catch (e: Exception) {
logger.severe("Error while comparing dates ${e.message}")
false
}
}

fun parseDate(date: String): Date? {
dateFormats.forEach {
try {
Expand All @@ -78,10 +62,9 @@ object DateUtils {
}


val issuanceDate: Date = parseDate(vcJsonObject.optString(ISSUANCE_DATE))
?: throw ValidationException(ERROR_ISSUANCE_DATE_INVALID, "${ERROR_CODE_INVALID}${ISSUANCE_DATE}")
val issuanceDate = vcJsonObject.optString(ISSUANCE_DATE) ?: ""

if (issuanceDate.isFutureDateWithTolerance()) {
if (isFutureDateWithTolerance(issuanceDate)) {
throw ValidationException(ERROR_CURRENT_DATE_BEFORE_ISSUANCE_DATE,
ERROR_CODE_CURRENT_DATE_BEFORE_ISSUANCE_DATE
)
Expand All @@ -100,7 +83,7 @@ object DateUtils {
}
}

if (vcJsonObject.has(VALID_FROM) && !isDatePassedCurrentDate(
if (vcJsonObject.has(VALID_FROM) && isFutureDateWithTolerance(
vcJsonObject.optString(
VALID_FROM
)
Expand All @@ -111,15 +94,20 @@ object DateUtils {
}

fun isVCExpired(inputDate: String): Boolean {
return inputDate.isNotEmpty() && isDatePassedCurrentDate(inputDate)
return inputDate.isNotEmpty() && !isFutureDateWithTolerance(inputDate)
}

}
fun isFutureDateWithTolerance(inputDateString: String, toleranceInMilliSeconds: Long = 3000): Boolean {
val inputDate: Date? = parseDate(inputDateString)
if (inputDate == null) {
logger.severe("Given date is not available in supported date formats")
return false
}
val currentTime = System.currentTimeMillis()
val inputDateTime = inputDate.time

fun Date.isFutureDateWithTolerance(toleranceInMilliSeconds: Long = 3000): Boolean {
val currentTime = System.currentTimeMillis()
val inputDateTime = this.time
val upperBound = currentTime + toleranceInMilliSeconds
return inputDateTime > upperBound
}

val upperBound = currentTime + toleranceInMilliSeconds
return inputDateTime > upperBound
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import android.os.Build
import io.mockk.clearAllMocks
import io.mockk.every
import io.mockk.mockkObject
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_CODE_INVALID_DATE_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_MESSAGE_INVALID_DATE_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_CODE_INVALID_VALID_FROM_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_CODE_INVALID_VALID_UNTIL_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_MESSAGE_INVALID_VALID_FROM_MSO
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants.ERROR_MESSAGE_INVALID_VALID_UNTIL_MSO
import io.mosip.vercred.vcverifier.exception.UnknownException
import io.mosip.vercred.vcverifier.exception.ValidationException
import io.mosip.vercred.vcverifier.utils.BuildConfig
Expand Down Expand Up @@ -37,8 +39,8 @@ class MsoMdocValidatorTest {

@Test
fun `should return true when credential is successfully validated`() {
every { DateUtils.isDatePassedCurrentDate("2024-10-23T07:01:17Z") } returns true
every { DateUtils.isDatePassedCurrentDate("2026-10-23T07:01:17Z") } returns false
every { DateUtils.isFutureDateWithTolerance("2024-10-23T07:01:17Z") } returns false
every { DateUtils.isFutureDateWithTolerance("2026-10-23T07:01:17Z") } returns true

val isVerified = MsoMdocValidator().validate(
"omdkb2NUeXBldW9yZy5pc28uMTgwMTMuNS4xLm1ETGxpc3N1ZXJTaWduZWSiamlzc3VlckF1dGiEQ6EBJqEYIVkBxDCCAcAwggFloAMCAQICFH6lICTsAhkMivItOT9v6JeZubwmMAoGCCqGSM49BAMCME4xCzAJBgNVBAYTAk1LMQ4wDAYDVQQIDAVNSy1LQTERMA8GA1UEBwwITW9ja0NpdHkxDTALBgNVBAoMBE1vY2sxDTALBgNVBAsMBE1vY2swHhcNMjQxMDIyMDcwMjUwWhcNMjUxMDIyMDcwMjUwWjBOMQswCQYDVQQGEwJNSzEOMAwGA1UECAwFTUstS0ExETAPBgNVBAcMCE1vY2tDaXR5MQ0wCwYDVQQKDARNb2NrMQ0wCwYDVQQLDARNb2NrMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEjtRcOXgIyR_xqGB-M6d0qkrjQWOBGGdlPgfIfb2xW0egZAVEz_55IXCofWaprRGxX7qQTlNAZyByniay2jzhR6MhMB8wHQYDVR0OBBYEFNqAHypQYcwWoeUfmMv4SbztomFvMAoGCCqGSM49BAMCA0kAMEYCIQDsgsz9wCa56ukpfyvq9371b5GhkSZb38G7xFofWgFtJwIhAKxACllIOtcleKETDFGa3araADjKd2isahQtXZwQmPr1WQJR2BhZAkymZ3ZlcnNpb25jMS4wb2RpZ2VzdEFsZ29yaXRobWdTSEEtMjU2Z2RvY1R5c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dGVsZWxlbWVudFZhbHVlajIwMjktMTAtMjPYGFifpGhkaWdlc3RJRANmcmFuZG9tUCC-v7ARALJ2VFcYww9AbMhxZWxlbWVudElkZW50aWZpZXJyZHJpdmluZ19wcml2aWxlZ2VzbGVsZW1lbnRWYWx1ZXhIe2lzc3VlX2RhdGU9MjAyNC0xMC0yMywgdmVoaWNsZV9jYXRlZ29yeV9jb2RlPUEsIGV4cGlyeV9kYXRlPTIwMjktMTAtMjN92BhYV6RoZGlnZXN0SUQBZnJhbmRvbVDjoYj_8RBZ62-85iZV371vcWVsZW1lbnRJZGVudGlmaWVyb2RvY3VtZW50X251bWJlcmxlbGVtZW50VmFsdWVkMTIzM9gYWFWkaGRpZ2VzdElEBGZyYW5kb21Qg7iWcNbZ-b9S2D3u3Av2YnFlbGVtZW50SWRlbnRpZmllcm9pc3N1aW5nX2NvdW50cnlsZWxlbWVudFZhbHVlYk1L2BhYWKRoZGlnZXN0SUQAZnJhbmRvbVAFg1zMFq1oLYxHiib0UCeYcWVsZW1lbnRJZGVudGlmaWVyamJpcnRoX2RhdGVsZWxlbWVudFZhbHVlajE5OTQtMTEtMDbYGFhUpGhkaWdlc3RJRAdmcmFuZG9tUElZm1bdU7M1GlcrQPJ_ctNxZWxlbWVudElkZW50aWZpZXJqZ2l2ZW5fbmFtZWxlbGVtZW50VmFsdWVmSm9zZXBo2BhYVaRoZGlnZXN0SUQFZnJhbmRvbVB_NHtdmXkWLPqVnSgypGGWcWVsZW1lbnRJZGVudGlmaWVya2ZhbWlseV9uYW1lbGVsZW1lbnRWYWx1ZWZBZ2F0aGE="
Expand All @@ -49,27 +51,27 @@ class MsoMdocValidatorTest {

@Test
fun `should throw exception when current time is greater than validFrom`() {
every { DateUtils.isDatePassedCurrentDate("2024-10-23T07:01:17Z") } returns false
every { DateUtils.isDatePassedCurrentDate("2026-10-23T07:01:17Z") } returns false
every { DateUtils.isFutureDateWithTolerance("2024-10-23T07:01:17Z") } returns true
every { DateUtils.isFutureDateWithTolerance("2026-10-23T07:01:17Z") } returns true
val verificationException = assertThrows(ValidationException::class.java){
MsoMdocValidator().validate("omdkb2NUeXBldW9yZy5pc28uMTgwMTMuNS4xLm1ETGxpc3N1ZXJTaWduZWSiamlzc3VlckF1dGiEQ6EBJqEYIVkBxDCCAcAwggFloAMCAQICFH6lICTsAhkMivItOT9v6JeZubwmMAoGCCqGSM49BAMCME4xCzAJBgNVBAYTAk1LMQ4wDAYDVQQIDAVNSy1LQTERMA8GA1UEBwwITW9ja0NpdHkxDTALBgNVBAoMBE1vY2sxDTALBgNVBAsMBE1vY2swHhcNMjQxMDIyMDcwMjUwWhcNMjUxMDIyMDcwMjUwWjBOMQswCQYDVQQGEwJNSzEOMAwGA1UECAwFTUstS0ExETAPBgNVBAcMCE1vY2tDaXR5MQ0wCwYDVQQKDARNb2NrMQ0wCwYDVQQLDARNb2NrMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEjtRcOXgIyR_xqGB-M6d0qkrjQWOBGGdlPgfIfb2xW0egZAVEz_55IXCofWaprRGxX7qQTlNAZyByniay2jzhR6MhMB8wHQYDVR0OBBYEFNqAHypQYcwWoeUfmMv4SbztomFvMAoGCCqGSM49BAMCA0kAMEYCIQDsgsz9wCa56ukpfyvq9371b5GhkSZb38G7xFofWgFtJwIhAKxACllIOtcleKETDFGa3araADjKd2isahQtXZwQmPr1WQJR2BhZAkymZ3ZlcnNpb25jMS4wb2RpZ2VzdEFsZ29yaXRobWdTSEEtMjU2Z2RvY1R5cGV1b3JnLmlzby4xODAxMy41LjEubURMbHZhbHVlRGlnZXN0c6Fxb3JnLmlzby4xODAxMy41LjGoAlggd4bqGFzNwBXyzdGmeipRMfjTQKQuzs6nvM7Z1AXsFBQGWCCaGHxiAeoHvfCNpkG3XpGTTQ787Fg9f3R9UTvKGa0mqwNYICnPRqwtKq9fYqI0sR96Ha3151joEQb24VAzTK4jw8puAVggHp8Y6cV73O670tvfMiyCZoxGczcYyfOh43Q8ahKpxxcEWCC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ZGlnZXN0SUQBZnJhbmRvbVDjoYj_8RBZ62-85iZV371vcWVsZW1lbnRJZGVudGlmaWVyb2RvY3VtZW50X251bWJlcmxlbGVtZW50VmFsdWVkMTIzM9gYWFWkaGRpZ2VzdElEBGZyYW5kb21Qg7iWcNbZ-b9S2D3u3Av2YnFlbGVtZW50SWRlbnRpZmllcm9pc3N1aW5nX2NvdW50cnlsZWxlbWVudFZhbHVlYk1L2BhYWKRoZGlnZXN0SUQAZnJhbmRvbVAFg1zMFq1oLYxHiib0UCeYcWVsZW1lbnRJZGVudGlmaWVyamJpcnRoX2RhdGVsZWxlbWVudFZhbHVlajE5OTQtMTEtMDbYGFhUpGhkaWdlc3RJRAdmcmFuZG9tUElZm1bdU7M1GlcrQPJ_ctNxZWxlbWVudElkZW50aWZpZXJqZ2l2ZW5fbmFtZWxlbGVtZW50VmFsdWVmSm9zZXBo2BhYVaRoZGlnZXN0SUQFZnJhbmRvbVB_NHtdmXkWLPqVnSgypGGWcWVsZW1lbnRJZGVudGlmaWVya2ZhbWlseV9uYW1lbGVsZW1lbnRWYWx1ZWZBZ2F0aGE=")
}

assertEquals(ERROR_MESSAGE_INVALID_DATE_MSO,verificationException.errorMessage)
assertEquals(ERROR_CODE_INVALID_DATE_MSO,verificationException.errorCode)
assertEquals(ERROR_MESSAGE_INVALID_VALID_FROM_MSO,verificationException.errorMessage)
assertEquals(ERROR_CODE_INVALID_VALID_FROM_MSO,verificationException.errorCode)
}

@Test
fun `should throw exception when current time is less than validUntil`() {
every { DateUtils.isDatePassedCurrentDate("2024-10-23T07:01:17Z") } returns true
every { DateUtils.isDatePassedCurrentDate("2026-10-23T07:01:17Z") } returns true
every { DateUtils.isFutureDateWithTolerance("2024-10-23T07:01:17Z") } returns false
every { DateUtils.isFutureDateWithTolerance("2026-10-23T07:01:17Z") } returns false

val verificationException = assertThrows(ValidationException::class.java){
MsoMdocValidator().validate("omdkb2NUeXBldW9yZy5pc28uMTgwMTMuNS4xLm1ETGxpc3N1Z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YWFWkaGRpZ2VzdElEBGZyYW5kb21Qg7iWcNbZ-b9S2D3u3Av2YnFlbGVtZW50SWRlbnRpZmllcm9pc3N1aW5nX2NvdW50cnlsZWxlbWVudFZhbHVlYk1L2BhYWKRoZGlnZXN0SUQAZnJhbmRvbVAFg1zMFq1oLYxHiib0UCeYcWVsZW1lbnRJZGVudGlmaWVyamJpcnRoX2RhdGVsZWxlbWVudFZhbHVlajE5OTQtMTEtMDbYGFhUpGhkaWdlc3RJRAdmcmFuZG9tUElZm1bdU7M1GlcrQPJ_ctNxZWxlbWVudElkZW50aWZpZXJqZ2l2ZW5fbmFtZWxlbGVtZW50VmFsdWVmSm9zZXBo2BhYVaRoZGlnZXN0SUQFZnJhbmRvbVB_NHtdmXkWLPqVnSgypGGWcWVsZW1lbnRJZGVudGlmaWVya2ZhbWlseV9uYW1lbGVsZW1lbnRWYWx1ZWZBZ2F0aGE=")
}

assertEquals(ERROR_MESSAGE_INVALID_DATE_MSO,verificationException.errorMessage)
assertEquals(ERROR_CODE_INVALID_DATE_MSO,verificationException.errorCode)
assertEquals(ERROR_MESSAGE_INVALID_VALID_UNTIL_MSO,verificationException.errorMessage)
assertEquals(ERROR_CODE_INVALID_VALID_UNTIL_MSO,verificationException.errorCode)
}

@Test
Expand Down
Loading

0 comments on commit 210834a

Please sign in to comment.