← All Spring Framework Flashcard Decks

Regulatory Frameworks & Compliance Flashcards

7 cards from real Spring Framework practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Regulatory Frameworks & Compliance flashcards as text
  1. Which Spring Security feature helps enforce GDPR data minimization by restricting which fields are returned from REST endpoints?

    Answer: Spring Data Projections with method security

    Spring Data Projections restrict which fields are exposed per interface, and combining them with @PreAuthorize lets you serve different field sets based on user roles.

  2. When configuring a Spring Boot application for HIPAA compliance, which approach best ensures PHI is never written to application logs?

    Answer: Implementing a custom Logback filter that scrubs sensitive fields

    A custom Logback TurboFilter or Filter can intercept log events and redact or drop PHI fields before they are written to any appender.

  3. Which Spring Security OAuth2 grant type is most appropriate for a backend service that calls another internal service without user interaction, supporting SOX audit trails?

    Answer: Client Credentials

    The Client Credentials grant is designed for machine-to-machine calls where no user context exists, and the client ID can be used as the audit identity.

  4. How does Spring Vault integrate with compliance requirements for secret rotation without application restart?

    Answer: It uses @RefreshScope beans so secrets can be reloaded via /actuator/refresh

    @RefreshScope combined with Spring Cloud Config and Vault allows secrets to be rotated in Vault and pulled into the running application without a restart.

  5. A PCI-DSS audit requires proof that all database queries accessing cardholder data are logged with the authenticated user's identity. Which Spring component is best suited for this cross-cutting concern?

    Answer: @Around AOP advice on repository methods

    @Around AOP advice can wrap repository or service calls to capture the SecurityContext principal and write a structured audit log entry for each data access.

  6. Which Spring Security mechanism prevents a CSRF attack in a REST API that uses JWT bearer tokens instead of session cookies?

    Answer: Disabling CSRF protection because stateless JWTs don't use session cookies

    CSRF exploits session cookies; since JWT-based APIs carry tokens in Authorization headers (not cookies), CSRF is not applicable and protection can be disabled.

  7. Under NIST 800-53, least-privilege access control should be enforced. Which Spring Security annotation restricts a method so only users with both ROLE_AUDITOR and a custom authority 'READ_REPORTS' can invoke it?

    Answer: @PreAuthorize("hasRole('AUDITOR') and hasAuthority('READ_REPORTS')")

    @PreAuthorize supports SpEL expressions including logical 'and', allowing you to combine role and authority checks in a single annotation.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. docs.broadcom.com — Test delivery, retake policy, exam information · verified Oct 2026
  2. spring-academy.broadcom.com — Eligibility · verified Oct 2026
  3. broadcom.com — Fees, exam format, passing score, time limit · verified Oct 2026