-
Notifications
You must be signed in to change notification settings - Fork 100
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
Deploy code version2.zip failed (upload step): 403 (Forbidden ) #117
Comments
Hi @awarberg, can you copy-paste your WebDAV client permissions here (IMPORTANT: remove your client ID before pasting). You most likely miss either write permission for your client id for the cartridges repo on your environment. I must be:
|
Hi Tobias, These are my WebDAV client permissions on Staging:
|
The settings are correct. If this is staging, probably there is 2FA for code upload enabled on your staging instance?! In that case, you'd have to generate a certificate using the cert bundle provided via a support case and then use the |
Good point, I read that 2FA will be required on April 1st! I have tried to check whether my Staging instance was configured but this setting does not exist under From https://xchange.demandware.com/docs/DOC-52987: Anyways, I tried using my certificate and passphrase but am getting the same error message: |
Is there a chance you can run with |
This is the debug output. Thanks for taking the time!
|
When you use 2FA for code deployments to staging, you'd have to use a slightly different host name, which is |
It works, thank you so much for the help! :-) I now get a successful response:
|
👍 |
I am running into a new issue when attempting to active the newly uploaded code version. I have checked and there are no IP-based access restrictions. What could be causing code deployment to work and activation to fail immediately after?
This is my OCAPI Data settings:
|
@awarberg your Data API settings are correct. The error is expected. The reason is, that technically only HTTP PUT requests are being limited on staging and require 2FA authentication. The 2FA authentication has to be done for the host |
It works using the normal host name! Thank you so much! Have a great weekend! |
You’re welcome! Same to you.
On Fri 27. Mar 2020 at 21:57, awarberg ***@***.***> wrote:
It works using the normal host name! Thank you so much! Have a great
weekend!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#117 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQOUEKTCFHUVQBODJWAOWTRJUHNFANCNFSM4LUKBFGQ>
.
--
TOBIAS LOHR
Technical Architect Director | Program Architect
Commerce Cloud B2C Services | CSG EMEA Services
Salesforce
Leutragraben 2-4
07743 Jena, Germany
Mobile: +49-151-16215221
*Upcoming PTO:*
- *April 10th - April 24th 2020*
*Upcoming Parental Leave:*
- *June 24th - September 23rd 2020*
|
Hello, Fist of all, thank you for your explanation and support here. It helped us a lot. We have the direct next issue regarding 2FA with certificate and code upload. (Tell me if I have to open a new issue) We want to use the We can upload our code using the
How can we get a token from our CI/CD? |
@bbdemaugere
As there is no user involved it does not bring up 2FA in the authenticator app and thus allows you to run automations. |
Sorry for the delayed response and thanks for yours. I did some tests and I have now a better understanding of the situation. I were testing sfcc-ci with my personal client-id key and I did some configurations in the Account Manager to use it with the Swagger (1). I guess that's why With Redirect URIs sets to
(Note: This client id can't be used to access the swagger with this config, tho) Thanks again for the help! :) |
One last thing: I highly suggest that you not use a client ID configured with a redirect URL for accessing critical resources on your B2C Commerce instances (e.g. through OCAPI settings or WebDAV client permissions) unless you explicitly want that. Reason is, that anyone who is in possession of the client ID may authenticate against Account Manager and then is able to execute commands against your B2C Commerce instance. A more safer approach is using client credentials incl. client id and secret, and authenticate with:
Setting the Redirect URIs should not have something to do with 2FA actually. |
@tobiaslohr it's my first time deploying code to staging instance. I don't understand your last sentence "A more safer approach is using client credentials incl. client id and secret, and authenticate with: sfcc-ci client:auth " |
@albertogiantin-hfarm That statement was related to the use of that API client along with a redirect url configured in Account Manager. It's not related to the 2FA cert to deploy code on staging. |
Hi @tobiaslohr , I'm also facing a similar issue tried using When I try Get following response
Thanks |
Fixed it the env URL was incorrect (without . version) Still thanks a lot this thread helped me out with the whole staging deployment process |
👍 |
Hi @tobiaslohr
|
@Ufarooq6 Can you check #571 (comment) please and see if that helps? Thanks! |
Having followed the step-by-step guide at https://github.com/SalesforceCommerceCloud/sfcc-ci#how-do-i-get-set-up I was able to run
sfcc-ci code:list
and get a successful response listing my code versions.When I try to run
sfcc-ci code:deploy version2.zip
I get "Deploy code version2.zip failed (upload step): 403 (Forbidden )". I have checked that the API Client ID appears correctly in Administration > Organization > WebDAV Client Permissions.NB. The output of
sfcc-ci client:auth
is "Authentication succeeded" where dw.json contains the client-id and client-secret of same API Client and my personal login.What are the correct instructions that I should follow to make code deployments work, apart from the How-do-I-get-set-up guide?
The text was updated successfully, but these errors were encountered: