A simple Go web server with logging, tracing, health check, graceful shutdown

package main

import (

“context”

“flag”

“fmt”

“log”

“net/http”

“os”

“os/signal”

“sync/atomic”

“time”

)

type key int

const (

requestIDKey key = 0

)

var (

listenAddr string

healthy int32

)

func main() {

flag.StringVar(&listenAddr, “listen-addr”, “:5000”, “server listen address”)

flag.Parse()

logger := log.New(os.Stdout, “http: “, log.LstdFlags)

logger.Println(“Server is starting…”)

router := http.NewServeMux()

router.Handle(“/”, index())

router.Handle(“/healthz”, healthz())

nextRequestID := func() string {

return fmt.Sprintf(“%d”, time.Now().UnixNano())

}

server := &http.Server{

Addr: listenAddr,

Handler: tracing(nextRequestID)(logging(logger)(router)),

ErrorLog: logger,

ReadTimeout: 5 * time.Second,

WriteTimeout: 10 * time.Second,

IdleTimeout: 15 * time.Second,

}

quit :=


Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/dUU_Dbfip_Y/10b4a980cd07cb02836f70a4ab3e72d7

Original article

On the End-To-End Security of Group Chats in Signal, WhatsApp, and Threema

More is Less: On the End-to-End Security of Group Chats in Signal, WhatsApp, and Threema
Paul Rösler and Christian Mainka and Jörg Schwenk
Abstract: Secure instant messaging is utilized in two variants: one-to-one communication and group communication. While the first variant has received much attention lately (Frosch et al., EuroS&P16; Cohn-Gordon et al., EuroS&P17; Kobeissi et al., EuroS&P17), little is known about the cryptographic mechanisms and security guarantees of secure group communication in instant messaging.

To approach an investigation of group instant messaging protocols, we first provide a comprehensive and realistic security model. This model combines security and reliability goals from various related literature to capture relevant properties for communication in dynamic groups. Thereby the definitions consider their satisfiability with respect to the instant delivery of messages. To show its applicability, we analyze three widely used real-world protocols: Signal, WhatsApp, and Threema. Since these protocols and their implementations are mostly undocumented for the


Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/RxPOwlutJnI/713

Original article

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: