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

Fix/401 redirect on actuator requests #1697

Merged
merged 2 commits into from Apr 16, 2021

Conversation

ulischulte
Copy link
Contributor

@ulischulte ulischulte commented Apr 12, 2021

closes #1640, #1691 and probably some other issues connected to redirects to login.

I corrected the predicate inside the redirectOn401 (isInstanceActuatorRequest didn't include the baseUrl and so the predicate never matched).
However - the existance of this predicate suggests that there was previously a reaction to a 401 at actuator endpoints (still don't know why it occurs though).
I added a retry for the subscriptions and the UI seems to be working correctly with these adjustments.

err => {
return err.pipe(
delay(1000),
take(2)
Copy link
Contributor

Choose a reason for hiding this comment

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

in the previous implementation you chose take(5) instead of 2. Is there any reason for doing this? Would it make sense to refactor the whole pipe implementation to a function which can be reused anywhere? Like as follows:

const pipeRetry = (stream) => pipe(concatMap(stream), retryWhen(
    err => {
      return err.pipe(
        delay(1000),
        take(5)
      )
    }));

return timer(0,5000).pipeRetry(vm.fetchHttptrace).subscribe(....);

@SteKoe SteKoe merged commit 875cc28 into master Apr 16, 2021
@SteKoe SteKoe deleted the fix/401-redirect-on-actuator-requests branch April 16, 2021 06:06
SteKoe added a commit to ParkerM/spring-boot-admin that referenced this pull request Apr 16, 2021
…-relpaths

* origin/master:
  Add retry on failing subscription (codecentric#1697)
  chore(deps): update dependency pl.project13.maven:git-commit-id-plugin to v4.0.4 (codecentric#1663)
  chore(deps): update dependency com.puppycrawl.tools:checkstyle to v8.41.1 (codecentric#1648)
  Fix for codecentric#1638 (codecentric#1673)
  Improve npm ci build times (see codecentric#1688) (codecentric#1689)
  Improved execution of grouped assertions (codecentric#1674)
  Use maven repo cache during publish snapshots (codecentric#1687)
  chore(deps): update metcalfc/changelog-generator action to v1 (codecentric#1669)
  chore(deps): update dependency org.codehaus.mojo:flatten-maven-plugin to v1.2.7 (codecentric#1686)
  Fix file formating by applying spring-javaformat:apply (codecentric#1685)
  Cache mvn repo in main build (see codecentric#1677 ) (codecentric#1678)
  Added support DingTalk notifier. (codecentric#1653)
  Simplify some code (codecentric#1670)
  Bugfix/1646 (codecentric#1661)
  Upgrade spring cloud dependencies (codecentric#1645)
  chore(deps): update dependency com.github.eirslett:frontend-maven-plugin to v1.11.2 (codecentric#1635)
  chore(deps): update spring boot to v2.4.3 (codecentric#1637)
  Bump version to 2.4.1-SNAPSHOT
  chore(deps): update testcontainers.version to v1.15.2 (codecentric#1629)
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.

Failing request on metrics redirect to login page
2 participants