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(services-bff): Remove log #16767

Closed
wants to merge 36 commits into from

Conversation

snaerseljan
Copy link
Contributor

@snaerseljan snaerseljan commented Nov 8, 2024

Move client_id and client_secret from ids par requests body to header

What

This PR moves all client id and secrets from request body to authorization header instead

Why

Client secret was leaking to identity server logs. Duenedes documentation alters from Auth0 2.0 documentation
https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • Bug Fixes

    • Streamlined error handling in the logout process, reducing unnecessary logging.
    • Improved validation for the logout token, ensuring better error management.
  • Chores

    • Reorganized import statements for better clarity and consistency.

rafnarnason and others added 30 commits November 5, 2024 10:09
* 0 argument null [] fix

* cleanup

* Empty commit for triggering CI/CD

* no semis

* chore: nx format:write update dirty files

* Empty commit for triggering CI/CD

* Empty commit for triggering CI/CD

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…ion button (#16718)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix(services-bff): Fix bff proxy download service aws cognito

* chore: charts update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix(download-service): Grant namespace to bff admin portal

* chore: charts update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…16320)

* Most common page types are now directly fetched from cms

* Revert frontpage change

* Fetch manuals from contentful

* Remove cache invalidation service

* Fetch events and service web page from cms

* Remove todos

* Fetch keywords as well

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Includes court case number in indictment name sent to court

* Updates unit tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…6721)

* seed to create general mandate delegation between gervimenn

* added transaction to the seed script

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Sameness for all DD_* and GIT_* ARG and ENV

* Reorder ARG and ENVS

* Ignore explicit versioning warning

* more build args

* Update buildx action

* Debug script

* Move docker args to own prepare step

* Add more ARG and ENV to output-* layers

* Whitespaces

* Revert Dockerfile to main

* Revert "Revert Dockerfile to main"

This reverts commit 645e21d.

* Revert image reference hacks to main

* Move ARG and ENV to end of output image

* Corrected echoing

* Better repository url

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Fixes in program selection step
-display alertMessage if programList is empty
-clear program selection when selecting school
-save universityName and programName in answers when using preDetermined selection
-fix default value for modeOfDelivery (not always ON_SITE)
-make sure modeOfDelivery is not cleared when going back and forth
-make sure modeOfDelivery is reset when selecting program

* Fixes in overview:
-display attachments
-display other document
-format date
-show country name not code
-show degree level name not code

* Cleanup

* cleanup

* Clear testing site

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix: init

* fix: type

* fix: date wrangling

* fix: tests

* fix: build

* fix: machine license client tests

* fix: remove invalid tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat: create introwrapper and implement on few screens

* chore: clean up imports

* chore: clean upimports

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix(services-bff): Fix prod infra config

* chore: charts update dirty files

---------

Co-authored-by: andes-it <[email protected]>
* use national-registry-v3 in identity lookup

* Adds missing NationalRegistryV3ClientConfig

* chore: nx format:write update dirty files

* rename service and small type fix

---------

Co-authored-by: andes-it <[email protected]>
…at are being indexed. (#16627)

* Only update/delete delegation index of the types that are being indexed.

Otherwise we are deleting all that are of a type not in the current array being indexed

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
* gm-delegation-webhook

* chore: charts update dirty files

* pr comments fixes

* pr comments fixes

* fix broken test

* Pr comments

* Pr comments

* chore: nx format:write update dirty files

* fix translation string

* Config module

* set config module to app.modules

* dev fallback for zendesk token

* fix tests to use config

* fix tests to use config

* fix build

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Adds migration for inserting default scopes to existing clients

* Adds phone, address and email as default scopes when creating clients

* chore: nx format:write update dirty files

* small refactoring

* chore: nx format:write update dirty files

* wrap in try/catch and use transaction

* chore: nx format:write update dirty files

* fix missing transaction commit

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…unctions for select, radio and checkbox fields (#16644)

* Add locale to arguments passed to options functions for select, radio and checkbox fields

* Add locale to title in all fields

* Fix test

* Add locale to description field

* Update test

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…pdown (#16708)

* chore(application-system): Translate country list in phone prefix dropdown

* PR comments

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…with error (and user has over 20 vehicles) (#16752)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix: disable global-auth on download-service

* fix: empty prod annotation

* chore: charts update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
RunarVestmann and others added 6 commits November 7, 2024 14:05
… year is the most recent one (#16751)

* Only fetch preview if selected year is the most recent one

* Overwrite what date gets sent to backend

* Add function for comparing years

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…16761)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Checkpoint

* Cleanup

* Remove user from getSubpoenaStatus

* Uncomment scopes

* Remove unused console..og

* Refactor

* Refactor

* Refactor

* Only update service status if there is no service status set

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
…case (#16687)

* feat(j-s): Handle advocate assigned to defendant notification

* Update defendant.service.ts

* Update defendantNotification.service.ts

* fix(j-s): Small fix on modal texts

* fix(j-s): Stop using advocate for defender emails

* fix(j-s): remove advocate assigned from user roles rules

* fix(j-s): remove and change tests

* test(j-s): Defendant notification tests

* Update update.spec.ts

* Update update.spec.ts

* Update sendDefenderAssignedNotifications.spec.ts

* Update defendantNotification.service.ts

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
@snaerseljan snaerseljan requested a review from a team as a code owner November 8, 2024 09:31
@snaerseljan snaerseljan added the deprecated:automerge (Disabled) Merge this PR as soon as all checks pass label Nov 8, 2024
Copy link
Contributor

coderabbitai bot commented Nov 8, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces modifications to the AuthService class within auth.service.ts. Key changes include a reordering of the import statements for the jsonwebtoken library, removal of a logging statement in the callbackLogout method, and a simplification of error handling within the same method. The changes do not affect the core functionality but streamline the code organization and logging behavior.

Changes

File Path Change Summary
apps/services/bff/src/app/modules/auth/auth.service.ts - Reordered import statements for jsonwebtoken.
- Removed logging statement in callbackLogout.
- Simplified error handling in callbackLogout method.

Possibly related PRs

Suggested reviewers

  • eirikurn

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@snaerseljan snaerseljan changed the base branch from main to release/32.3.0 November 8, 2024 09:38
@snaerseljan snaerseljan requested review from a team as code owners November 8, 2024 09:38
@snaerseljan snaerseljan closed this Nov 8, 2024
@snaerseljan snaerseljan removed the deprecated:automerge (Disabled) Merge this PR as soon as all checks pass label Nov 8, 2024
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.