Demo: testing the access matrix
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
prove the rules with a test for every endpoint and role. Prepares JNR-036-LAB1.
Draft outline details
Step by step
- Write a table: endpoint × anonymous/customer/admin → expected status.
- Turn it into a parameterized test with MockMvc.
- Run it and see all green.
- Planned mistake: put a broad
permitAllrule before ahasRole("ADMIN")rule; the admin-only test fails because the first match wins. Fix: reorder. - Commit the matrix test as the safety net for later changes.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.