GithubHelp home page GithubHelp logo

squirrel's Introduction

squirrel

Squirrel is a Simple HTTPs server for munki. See the [legacy](https://github.com/micromdm/squirrel/tree/legacy) branch for the API implementation. I plan on adding it back with Munki v3 support.

Features

  • Automatic HTTPS - squirrel provides a built in Let's Encrypt Client.
  • Basic Authentication - Basic Auth for munki repo
  • Use cloud storage as a repo backend.
  • Structured request logging with JSON or logfmt output.

Install

Download the latest release from the release page.

Quickstart

squirrel serve -repo=/path/to/munki_repo -tls-domain=munki.corp.example.com --basic-auth=CHANGEME

-repo flag must be set to the path of a munki repository.
-tls-domain flag must be set to the domain of your munki repo. This value is used by squirrel to obtain new TLS certificates.
-basic-auth flag must be set to a password which will be used for authentication to the munki repo.

Once the server starts, you will see a prompt which prints the correct Authorization header that you need to add to your munki configuration profile. The help text is convenient, but you might want to disable it if you're capturing logs somewhere. Use -no-help flag to disable printing the help text.

Example:

Authorization: Basic c3F1aXJyZWw6Q0hBTkdFTUU=

See squirrel help for full usage.

Keep the process running with systemd

For help with systemd see the example/systemd folder.

Enroll mac hosts:

For help enrolling macOS hosts, check out the example/profile folder.

Repo provider

Squirrel has pluggable storage for munki repo, specified with the -provider flag. The default provider is set to filesystem, which will expect a local path to munki repo.

Other supported providers are s3 and gcs(google cloud storage).

See the provider specific sections below for how to connect to S3 or GCS.

S3 provider

First, export the necessary credentials of a IAM user and region as environment variables. (You can also use the ~/.aws/credentials config file as described here)

export AWS_ACCESS_KEY_ID=AKID1234567890
export AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
export AWS_REGION=us-east-1

Now serve squirrel. Use the AWS bucket name for the -repo flag.

squirrel serve -repo=awsbucketname -tls-domain=munki.corp.example.com --basic-auth=CHANGEME -provider=s3

To try the config locally on port 8080, you can run

squirrel serve -basic-auth="CHANGEME" -repo=awsbucketname -tls=false -provider=s3

Which will make your munki repo available at http://localhost:8080/repo/. Go to http://localhost:8080/repo/catalogs/all to get a list of available credentials.

Google Cloud Storage Provider

To use squirrel with GCS, you'll need a GCP service account file.

squirrel serve \
    -repo=gcsbucketname \
    -tls-domain=munki.corp.example.com \
    -basic-auth=CHANGEME \
    -provider=gcs \
    -gcs-credentials /Users/groob/Downloads/groob-gcs-credentials.json 

To try the config locally on port 8080, you can run

squirrel serve \
    -repo=gcsbucketname \
    -tls=false \
    -basic-auth=CHANGEME \
    -provider=gcs \
    -gcs-credentials /Users/groob/Downloads/groob-gcs-credentials.json 

Which will make your munki repo available at http://localhost:8080/repo/. Go to http://localhost:8080/repo/catalogs/all to get a list of available credentials.


squirrel icon by Agne Alesiute from the Noun Project.

squirrel's People

Contributors

discentem avatar groob avatar thorduri avatar

Watchers

 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.