Git Product home page Git Product logo

ldap-composed-task-runner-example's Introduction

LDAP Security and Composed Task Runner Example

This example provides a quick glance on how to run Compose Tasks on Spring Cloud DAta Flow with enabled LDAP security.

This repository provide an embedded LDAP server, running on port 40000 with pre-configured users. In this example we will use the following user:

  • username: joe
  • password: joespassword

Build + Start LDAP Server

$ git clone https://github.com/ghillert/ldap-composed-task-runner-example.git
$ ./mwnw clean package
$ java -jar target/ldapserver-0.0.1-SNAPSHOT.jar

Download + Start Spring Cloud Data Flow

wget https://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-dataflow-server-local/1.7.0.RC1/spring-cloud-dataflow-server-local-1.7.0.RC1.jar
wget https://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-dataflow-shell/1.7.0.RC1/spring-cloud-dataflow-shell-1.7.0.RC1.jar

Create a file application.yml with the following contents:

security:
  basic:
    enabled: true
spring:
  cloud:
    dataflow:
      security:
        authentication:
          ldap:
            enabled: true
            url: ldap://localhost:40000
            managerDn: uid=bob,ou=people,dc=springframework,dc=org
            managerPassword: bobspassword
            userSearchBase: ou=otherpeople,dc=springframework,dc=org
            userSearchFilter: uid={0}
            groupSearchFilter: member={0}
            groupRoleAttribute: cn
            groupSearchBase: ou=groups,dc=springframework,dc=org

Configure and run a Composed Task

First start the Spring Cloud Data Flow Shell:

java -jar spring-cloud-dataflow-shell-1.7.0.RC1.jar --dataflow.username=joe --dataflow.password=joespassword

Now we need to import the Composed Task Runner and the Spring Cloud Task App Starters:

dataflow:> app import http://bit.ly/Dearborn-GA-task-applications-maven

If you want to import just the Composed Task Runner applications:

dataflow:> app register --name composed-task-runner --type task --uri  maven://org.springframework.cloud.task.app:composedtaskrunner-task:2.0.0.RELEASE

It is important that use the latest task app starters, so we end up having at least Composed Task Runner version 2.0.0.RELEASE. The earlier versions had short-comings in regards to security. Therefore, don't use the app starters from the Clark release train.

Create + Run the Composed Task:

dataflow:> task create my-composed-task --definition "timestamp && timestamp-batch"
dataflow:> task launch my-composed-task --arguments "--dataflow-server-username=joe --dataflow-server-password=joespassword"

ldap-composed-task-runner-example's People

Contributors

ghillert avatar

Watchers

James Cloos avatar  avatar

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.