Code Monkey home page Code Monkey logo

spring-security-authn-and-authz-with-azure-active-directory's Introduction

Project Name

A project that demonstrates configuring Spring Security for AAD-specific features like On-Behalf-Of flow and AppRoles. It uses AAD's Boot starter to simplify configuration.

Features

This project provides the following features:

  • An OAuth 2.0 Client and two OAuth 2.0 Resource Servers. The client talks to the first resource server, which subsequently talks to the second resource server
  • It uses the AAD Boot starter to simplify configuration

Getting Started

Prerequisites

  • Requires JDK 8 or higher

Quickstart

  1. git clone [email protected]:Azure-Samples/spring-security-authn-and-authz-with-azure-active-directory.git
  2. cd spring-security-authn-and-authz-with-azure-active-directory

Demo

A demo app is included to show how to use the project.

To run the demo, follow these steps:

  1. ./gradlew :facility-request:bootRun
  2. ./gradlew :facility-inventory:bootRun
  3. ./gradlew :hr:bootRun
  4. Navigate to http://localhost:8880

With the application started, you can click the "Login" button and log in as:

Then, you can click "Back" and then the "Request Standing Desk" button, and it should succeed.

Next, click "Back" again and then you can click the "Login" button and log in as:

Then, you can click "Back" one more time and then the "Request Standing Desk" button, and it should fail.

Resources

spring-security-authn-and-authz-with-azure-active-directory's People

Contributors

chenrujun avatar jzheaux avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-security-authn-and-authz-with-azure-active-directory's Issues

Add Unit and Integration Test Examples

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Look at the code.

Any log messages given by the failure

None

Expected/desired behavior

It would be really nice if you could add unit and integration test examples. It is unclear to me how I can setup a Test Security Context that somehow mocks the Azure AD Token issuing.

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.