Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain Verification Failed! #66

Open
bmarw opened this issue Apr 28, 2024 · 1 comment
Open

Domain Verification Failed! #66

bmarw opened this issue Apr 28, 2024 · 1 comment

Comments

@bmarw
Copy link

bmarw commented Apr 28, 2024

Hi

I am working on integrating ONDC .We are buyer app. I followed this document.
https://github.com/ONDC-Official/developer-docs/blob/main/registry/Onboarding%20of%20Participants.md

I have reached till step number 5 and Now when I hit below url.with proper request body.
https://staging.registry.ondc.org/subscribe
What could be the reason for this. I used Java utility to generate the content inside the page.

I get
{
"message": {
"ack": {
"status": "NACK"
}
},
"error": {
"type": "DOMAIN-ERROR",
"code": "129",
"path": null,
"message": "https://comedia.in : Domain verification is failed "
}
}

I have proper request body.

Any help would be appreciated.

I don't know if content of my message body that I am sending is wrong or html page ondc-site-verification.html content field is wrong.

Regards
Bhanu

@bmarw
Copy link
Author

bmarw commented Apr 28, 2024

Steps I am doing:
I hit the local URL(Java Application)

  1. http://localhost:8080/get-keys
    I pick sign_private_key, and sign_public_key.
    2.I run Util Method in java class
    https://github.com/ONDC-Official/reference-implementations/blob/main/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Utils.java
 public static String sign(byte[] privateKey,byte[] message) {
        // initialise signature variable
        byte[] signature = new byte[Ed25519.SIGNATURE_SIZE];

        // sign the received message with given private key
        Ed25519.sign(privateKey, 0, message, 0, message.length, signature, 0);
        return  toBase64(signature);
    }

"message": {
"request_id": "ccfce272-13c3-4ca4-a070-64769f5df2a66"
and use above request_id to sign the request.
I get a value and place it inside content section of html page.

I have made sure that
"key_pair": {
"signing_public_key":"MnG3p1Cp5ofZEDE6cnOGeYX1EulMZSPHWTBRdzy/INk=",
is corresponding to the private Key that I am using to generate the content in html page,

I also feel there might be a bug in Utility method.
Because when I run verify on genrated signature it fails locally for me,

What can be done to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant