SSLcom / esigner-codesign

GitHub Action for CodeSigner by SSL.com
14 stars 2 forks source link

Space inside username parameter #26

Closed stasonchik33 closed 6 months ago

stasonchik33 commented 6 months ago

I am trying to sign an artifact using your docker container, but unfortunately, our company's account has a space inside a username, so i always get a error:

$ docker run -i --rm --volume $(pwd)/toSign:/codesign/examples --volume $(pwd)/output:/codesign/output --env-file $(pwd)/.env ghcr.io/sslcom/codesigner:latest sign -input_file_path=/codesign/examples/input.jar -output_dir_path=/codesign/output

Run CodeSigner Running ESigner.com CodeSign Action on Sandbox

/entrypoint.sh: line 31: [: "First: binary operator expected

Where .env file is:

USERNAME="First Second"
PASSWORD=xxx
TOTP_SECRET=xxx
ENVIRONMENT_NAME=TEST

I've tried all the ways of escaping: backslash, specifying parameters directly inside docker run command using '-e', different types of quotes on different OS'es, but no luck.

bayrakmustafa commented 6 months ago

@stasonchik33 I updated docker image. Can you pull the latest version ghcr.io/sslcom/codesigner:latest again and test it?

bsko commented 6 months ago

@bayrakmustafa i've checked the credentials twice, but still get

$ docker run -i --rm --volume %cd%/toSign:/codesign/examples --volume %cd%/output:/codesign/output --env-file %cd%/conf.env ghcr.io/sslcom/codesigner:latest sign -input_file_path=/codesign/examples/input.jar -output_dir_path=/codesign/output
Run CodeSigner
Running ESigner.com CodeSign Action on Sandbox

Something Went Wrong. Please try again.
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Error: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

even though we are using these creds to sign through app.esigner.com/esigner-express manually is there a way to figure out on which side now the problem is?

bayrakmustafa commented 6 months ago

@bayrakmustafa i've checked the credentials twice, but still get

$ docker run -i --rm --volume %cd%/toSign:/codesign/examples --volume %cd%/output:/codesign/output --env-file %cd%/conf.env ghcr.io/sslcom/codesigner:latest sign -input_file_path=/codesign/examples/input.jar -output_dir_path=/codesign/output
Run CodeSigner
Running ESigner.com CodeSign Action on Sandbox

Something Went Wrong. Please try again.
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Error: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

even though we are using these creds to sign through app.esigner.com/esigner-express manually is there a way to figure out on which side now the problem is?

@bsko I think you are testing with the account belonging to the production environment. In this case, you need to set the ENVIRONMENT_NAME value in the env file as PROD instead of TEST. Can you test it again after setting ENVIRONMENT_NAME=PROD?

bsko commented 6 months ago

@bayrakmustafa i've tried all possible approaches with inputs i have. So both TEST and PROD, thats how my conf.env looks like:

USERNAME="First Second" <username from secure.ssl.com account>
PASSWORD=<password from secure.ssl.com account>
TOTP_SECRET=OxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ= <taken from the form with QR code>
ENVIRONMENT_NAME=PROD
bayrakmustafa commented 6 months ago

@bayrakmustafa i've tried all possible approaches with inputs i have. So both TEST and PROD, thats how my conf.env looks like:

USERNAME="First Second" <username from secure.ssl.com account>
PASSWORD=<password from secure.ssl.com account>
TOTP_SECRET=OxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ= <taken from the form with QR code>
ENVIRONMENT_NAME=PROD

@bsko I made an update again. Can you pull the latest version again and test it?

bsko commented 6 months ago

@bayrakmustafa it works now, thank you very much for your support