title: How to implement role based authorization on resource server with new Spring Authorization Server
body: <p>I am trying out the new Spring Authorization Server, and I have hit a dead end in my endless googling.</p>
  <p>Without the @Secured and @EnableGlobalMethodSecurity configured, it works like a charm, but the moment I try to secure the resource server with the above annotations I now get a 403 Forbidden error.</p>
  <p><a href="https://i.stack.imgur.com/REmZ3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/REmZ3.png" alt="enter image description here" /></a></p>
  <p><strong>Authorization Server Configuration</strong></p>
  <p>DefaultSecurityConfig.java
  <a href="https://i.stack.imgur.com/t5K2j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t5K2j.png" alt="enter image description here" /></a></p>
  <p>MongoDBUserDetailsService.java (User Detail Service)</p>
  <p><a href="https://i.stack.imgur.com/4w2Sp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4w2Sp.png" alt="enter image description here" /></a>
  The roles are in the format of &quot;ADMIN&quot; without the prefix &quot;ROLE_&quot; since its already added during runtime.</p>
  <p><strong>Resource Server Configuration</strong></p>
  <p>ResourceServerConfig.java
  <a href="https://i.stack.imgur.com/QLHjA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QLHjA.png" alt="enter image description here" /></a></p>
  <p>ArticlesController.java
  <a href="https://i.stack.imgur.com/aRFlM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aRFlM.png" alt="enter image description here" /></a></p>