Problem/Motivation

While trying to connect to the subscription through api key/secret key through acquia connector, using version 4.1.0. Getting following error:

Client error: POST https://accounts.acquia.com/api/auth/oauth/token resulted in a 400 Bad Request response: {"errorCode":"E0000021","errorSummary":"Bad request. Accept and/or Content-Type headers likely do not match supported va (truncated...)

Steps to reproduce

  • Install Drupal
  • Install Acquia Connector 4.1.x
  • Visit Acquia Connector configuration form
  • Add Client ID and secret
  • Click Authenticate button

Proposed resolution

Update the validateForm method with current body and header to make the request works.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajeshreeputra created an issue. See original summary.

rajeshreeputra’s picture

Status: Active » Needs review

Requesting review.

ajits made their first commit to this issue’s fork.

japerry’s picture

Priority: Normal » Critical
Status: Needs review » Needs work

accounts.acquia.com is no longer available. Please see https://acquia.my.site.com/s/article/Acquia-ID-Implementation-and-Setup

We did some work back in December (#3491727) in anticipation of the Acquia ID rollout, but unfortunately the error we expected to get from accounts is not what matches what you're seeing here. Therefore, with all customer facing accounts now moved to Acquia ID, we need to remove all of the OpenID connect code, due to the new IDP not accepting static client IDs anymore.

ajits’s picture

@japerry thank you for the reply and for updating the priority! I also have a support request open for this issue.

rajeshreeputra’s picture

Status: Needs work » Needs review

With information provided in #5, I have removed the latest commit. Requesting review.

ajits’s picture

Status: Needs review » Needs work

@rajeshreeputra - The information provided in #5 was not about the commit I pushed afaict. It was about the bug we've encountered. I might be wrong. Can you please share what part of my commit you think was incorrect?
On another note, directly dropping a commit from a merge request doesn't seem correct. I suggest preserving the working history of the branch with git revert instead.

japerry’s picture

Status: Needs work » Needs review

Rajeshreeputra is correct here, we needed to simply adjust the post headers so the authenticate method would work. The client ID is no longer valid, so all of that code that you were working on is not needed anymore.

I've updated the MR to remove all of the oauth authorization token information. Note, for BC (because many of these methods are public), I've left most method signatures alone. In theory, you can run cron still and it'll get a token using the API key/secret provided during the login screen.

plach’s picture

Status: Needs review » Reviewed & tested by the community

This is working well here.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Done!

japerry’s picture

Fix for 7.x-4.x is committed as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.