Skip to content

FOUR-30920: Remove expected DevLink ping 401#8897

Open
eiresendez wants to merge 2 commits into
developfrom
bugfix/FOUR-30920
Open

FOUR-30920: Remove expected DevLink ping 401#8897
eiresendez wants to merge 2 commits into
developfrom
bugfix/FOUR-30920

Conversation

@eiresendez

@eiresendez eiresendez commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Creating a new DevLink currently stores the local DevLink record and then calls GET /api/1.0/devlink/{id}/ping before OAuth has completed. Because the DevLink does not have a usable access token yet, the ping returns a browser-visible 401 even though the flow is expected to continue to the remote OAuth/login step.

To reproduce:

  1. Log in as an admin.
  2. Go to Admin > DevLink.
  3. Create a new DevLink using a local or remote ProcessMaker URL.
  4. Observe that the flow redirects to OAuth/login correctly, but the browser console/network panel shows a 401 for the ping request.

Solution

  • Normalize DevLink ping responses into semantic statuses: ok, authorization_required, or error.
  • Return HTTP 200 for expected remote authorization failures so the browser no longer shows a false 401 during the happy path.
  • Update the Create DevLink flow to redirect for ok and authorization_required, and show the existing error state only for real failures.
  • Add focused API coverage for successful ping, unauthorized/forbidden remote responses, server failure, and connection failure.

How to Test

  • vendor/bin/phpunit tests/Feature/Api/DevLinkTest.php --filter Ping
  • vendor/bin/phpunit tests/Feature/Api/DevLinkTest.php
  • npm run development

Manual check:

  1. Create a new DevLink.
  2. Confirm the flow still redirects to the remote OAuth/login step.
  3. Confirm the local ping request no longer returns a browser-visible 401 during the expected pre-authorization path.

Related Tickets & Packages

ci:deploy

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://ci-09ba128f9d.engk8s.processmaker.net

@eiresendez
eiresendez requested a review from CarliPinell July 9, 2026 19:19
@eiresendez eiresendez self-assigned this Jul 9, 2026

@CarliPinell CarliPinell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.
No observations found

@processmaker-sonarqube

Copy link
Copy Markdown

@gitguardian

gitguardian Bot commented Jul 23, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34069781 Triggered Generic Password a633694 resources/views/auth/passwords/reset.blade.php View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@eiresendez

Copy link
Copy Markdown
Contributor Author

Please disregard the GitGuardian warning, as it is a false positive inherited from develop through the latest merge. The same finding was previously reported in PR #8871 under GitGuardian incident 34069781.

@CarliPinell

Copy link
Copy Markdown
Contributor

Hi @eiresendez Just in case please check that alert for GitGuardian in this pull

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://ci-09ba128f9d.engk8s.processmaker.net

@eiresendez

Copy link
Copy Markdown
Contributor Author

Hi @eiresendez Just in case please check that alert for GitGuardian in this pull

thanks @CarliPinell I created this ticket https://processmaker.atlassian.net/browse/FOUR-32376 it's a false-positive.

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

Successfully merging this pull request may close these issues.

3 participants