Skip to content

Documentation/Usage/Concepts questions #32

@prognostikos

Description

@prognostikos

Following is a description of how I think checkpoint can be integrated into a
web application. I would love to get feedback on this to see if I'm on the right
track. I'm particularly interested in how it can be integrated into a
"non-pebble-compliant" application as that's what I'm working with right now...

I intend to update the README or add other documentation with the answers I
get to this issue and/or any additional discussion.

If it's easier for me to "interview" you folks and then write it up I would be
happy to do so as well if that's preferable to long email/issue responses.

General concepts

So from what I can see the idea is that you run checkpoint on some application
server and then you proxy access to the /api/checkpoint/v1 urlspace from your
app to the checkpoint service. (I would do this via Nginx - the README mentions
ha-proxy).

So e.g. https://mycoolapp.example.com/ would be configured so that all requests
to https://mycoolapp.example.com/api/checkpoint/v1/** would go to checkpoint.

Correct me if I'm wrong on this.

Deployment & Architecture

Right now it seems like deploying would involve forking and cloning and
deploying directly from a repository?

From what I can see in the code, PostgreSQL is used as the durable data store,
while memcached is used to provide a cache for the session data? Is that correct
and/or are there other uses of memcached or other components?

We currently deploy our ruby and java apps with a combination of Chef to manage
the server setup and Capistrano to deploy the application code.

Notes on your current deployment(s) including clustering, hardware details,
no. requests/transactions, etc. would be great info to have.

Authentication flow

The login case seems to be fairly straightforward as outlined in the README.
What's less clear is how a "client application" authenticates a user when a
request is received with a checkpoint.session cookie/request param.

Authorization flow

Is the client application expected to validate this parameter via the
/api/checkpoint/v1/identity/me?session=xxxx for every request to the client
application?

Is there a library that can be included in other applications (e.g. rails apps)
that abstracts this process away and provides a current_user helper? There is a
mention of "Pebble-compliant web services" but I'm not clear on exactly what
that means.

Also there seems to be support for groups and group_subtrees and I haven't yet
seen any documentation about that (I've also not yet looked into the code/specs
for groups). Do Bengler store all user/group information in checkpoint and then
map users/groups to specific permissions in individual apps?

Authentication providers

Right now a lot of provider gems seem to be required. Is there any way to set
things up so that only the providers actually used are required? Or maybe
(depending on the answer to the deployment question) it's as simple as just
editing the Gemfile on our fork?

We would also need omniauth-linkedin integration, which I would be happy to add.
Is there documentation anywhere other than the code & tests for how to add
another provider?

Open Questions

Looks like there are some open security issues (#25, #24). On balance how tested
is checkpoint? @kytrinyx mentioned that it's been in production for over a
year at Bengler. Are there any other deployments?

Where are the fingerprints stored and how are they typically used?

How do you typically bridge between app-specific user information and the information
about the user stored in checkpoint? Map the identity pkey to a user table in the
app or something else entirely?


That's "it" for now...again I am happy to add the answers to these questions to
the documentation as I think it will help others who are not as emeshed in the
world of Pebbles as you Benglerites ;)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions