Add this line to your application’s Gemfile:
gem 'rails-keyserver'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rails-keyserver
The following is a sample of what we would like to achieve in terms of API endpoints:
# GET JSON
# /security/pgp_keys?date_from=X&date_to=Y&purpose=mail&sort_by=activation_date&order=desc
[
{
public: '===== BEGIN PGP BLOCK ==========.....',
key_id: 0x346cb447
key_type: rsa
expires: '2055/12/12 11:23:45Z+08:00'
key_size: 4096/4096
fingerprint: 72e5 f8ae da12 7b85 fadb 25a5 83a3 ef8c 346c b447
userid: apple product security
activation_date: '2055/12/12 11:23:45Z+08:00',
}
]
# GET JSON /security/pgp_keys
[
{
public: '===== BEGIN PGP BLOCK ==========.....',
key_id: 0x346cb446
key_type: rsa
expires: '2055/12/12 11:23:45Z+08:00'
key_size: 4096/4096
fingerprint: 72e5 f8ae da12 7b85 fadb 25a5 83a3 ef8c 346c b447
userid: apple product security
activation_date: '2055/12/12 11:23:45Z+08:00',
}
]
# rails users: public PGP
# DELETE JSON /settings/pgp_key
# POST PUT GET JSON /settings/pgp_key
200:
{
id: 'slfsjdfdklsj',
public: '===== BEGIN PGP BLOCK ==========.....',
key_id: 0x346cb446
key_type: rsa
expires: '2055/12/12 11:23:45Z+08:00'
key_size: 4096/4096
fingerprint: 72e5 f8ae da12 7b85 fadb 25a5 83a3 ef8c 346c b447
userid: apple product security
created_at: '2055/12/12 11:23:45Z+08:00',
}
422:
{
errors: {
format: 'invalid'
}
}
403:
{
errors: {
permission: 'denied'
}
}
First, thank you for contributing! We love pull requests from everyone. By participating in this project, you hereby grant Ribose Inc. the right to grant or transfer an unlimited number of non exclusive licenses or sub-licenses to third parties, under the copyright covering the contribution to use the contribution by all means.
Here are a few technical guidelines to follow:
-
Open an issue to discuss a new feature.
-
Write tests to support your new feature.
-
Make sure the entire test suite passes locally and on CI.
-
Open a Pull Request.
-
After receiving feedback, perform an interactive rebase on your branch, in order to create a series of cohesive commits with descriptive messages.
-
Party!
This gem is developed, maintained and funded by Ribose Inc.
The gem is available as open source under the terms of the MIT License.