Giter Site home page Giter Site logo

skyline's Introduction

skyline

A tool for bridging good old SMTP and OAuth2 protected email services. Can be run as a sidecar (recommended) or as a standalone service.

Note: This project is still in an early state and may be unsuitable for production workloads. PR's are most welcome ๐Ÿ™Œ

Features

  • Expose local SMTP server with optional basic authentication
  • Send email via Microsoft Graph (Office 365)
  • Prometheus metrics (default :5353/metrics)

Configuration

The project can be configured using either command line flags, using a configuration file or with environment variables.

Configuration file

The default location is ~/.skyline.yaml

debug: false
hostname: an-overridden-hostname                 # autodetected by default
port: 30333
metrics-port: 32111
sender-type: msGraph                             # currently the only implementation
ms-graph-config:
  tenant-id: <entra-id-tenant-id>
  client-id: <id>                                # app registration id
  client-secret: <secret>                        # app registration client secret
  sender-user-id: <user-object-id>               # found by viewing details of an user in Entra ID 
basic-auth-config:
  enabled: true 
  username: foo
  password: bar

Environment variables

All configuration properties can be specified as environment variables by replacing structure indentation, hyphens and spaces with _. All environment variables must be prefixed with SL_.

Run

Use go run, go build && ./skyline or use one of the prebuilt container images. You can also create your own local image with goreleaser release --snapshot --clean

Testing with Grafana Oncall

1. create file with envs local_testing/.env.skyline
    SL_BASIC_AUTH_CONFIG_ENABLED=TRUE
    SL_BASIC_AUTH_CONFIG_USERNAME=test
    SL_BASIC_AUTH_CONFIG_PASSWORD=test
    SL_MS_GRAPH_CONFIG_TENANT_ID=
    SL_MS_GRAPH_CONFIG_CLIENT_ID=
    SL_MS_GRAPH_CONFIG_CLIENT_SECRET=
    SL_MS_GRAPH_CONFIG_SENDER_USER_ID=
2. docker compose up -d
3. go to grafana at http://localhost:3000, user:pass admin:admin
4. enable oncall plugin: Administration -> Plugins -> Search for oncall -> Oncall backend url: http://engine:8080
5. edit oncall settings to use skyline. Host: Skyline, TLS: Off

rebuild skyline container

docker compose up --build skyline

skyline's People

Contributors

evenh avatar dependabot[bot] avatar martinhny avatar omaen avatar berg-thom avatar sarmil avatar anderssonw 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.