When administrating a server, I prefer to focus on meaningful log messages. If too many alerts are coming through, the important messages can be lost in the struggle. On one of our servers, there was a high volume of lfd perm block notifications. Email notifications similar to:
This is how to disable these messages within WHM/Cpanel.
Login to WHM
Search for/navigation to: Plugins > ConfigServer Security & Firewall
Programming Languages/Frameworks/Technologies/etc. used
AWS [Amazon Web Services]
Review Plans for 2016
Implement daily planning and time management
Went through streaks, but didn’t settle into a nice rhythm. Definitely see better flow when doing daily planning, but when the tasks start piling up, I tend to grind instead of plan.
25+ Blog posts (setting a more realistic goal this time)
I posted, but was once again considerably short of my goal.
Secure angel-funding for Human Planet
Schedule was pushed back a bit, just now hitting the road trying to raise a seed round. Did manage to make some great progress launching iPhone app, taking part in Techstar’s Startup Next Program, and launching our beta.
Beta launch of Human Planet
By the skin of our teeth, but we launched with Kome Sushi in December.
Plans for 2017
Implement daily planning and time management (carry over)
12+ Blog posts (for real setting a more realistic goal this time)
Secure seed-funding for Human Planet (carry over)
Work out at least 3 times per week. Fitness has taken a back seat to work this year, and it’s time to right the ship.
github.com/graphql-go/graphql and github.com/graphql-go/relay provide a
great starting point for creating your own Relay-compliant GraphQL server with Go. Authorization, however, is left up completely to the developer. Here
is how we implemented a /login endpoint and passed the resulting context to the GraphQL Handler.
We’ll leave the handling of these context values within GraphQL to another post…
The loginFunc() function at /login receives the posted request and extracts a username and password from it. ConfirmLogin() is not outlined above,
but is easy enough to implement. In our scenario, we validate the login against our database and return the user or an error.
If the login is valid, we create and return the JWT with our encoded custom claim values (UserID & IsAdmin).
When a request is made to the graphql handler, the requireAuth() middleware parses the JWT, and if valid, passes the (UserID & IsAdmin) variables via context.
The passing of context to GraphQL is explained in this post.
Go’s “net/http” package provides great out of the box server capabilites with extensible middleware. In order to leverage http middleware in combination with the “github.com/graphql-go/graphql” package, we needed to pass the http.Request.Context() to the graphql handler. Here is how we did so:
The AddContext() function is taking the standard http.Request.Context() and supplementing it with our additonal “authContext” map. This Context is then passed to the graphqlHandlerFunc where we setup a new GraphQL instance with the Context initialized to http.Request.Context().
This way, we can access these values within our GraphQL objects.