<commit_before># Secure Content Manager

Managing your servers passwords and sensitive information.

It also comes with minimal authentication and authorization mechanisms.

It is a working but FAR FROM READY FOR PRODUCTION prototype of what I need. Wait or help with it.

## Ideas in the backlog

- Audit
- Backup solution
- Data Types in the form of plugins (external repositories)
- Get data via easy to use api
- Some more data types
- etc...

## Getting Started

1. Get the code

    git clone <EMAIL>:tjoyal/secure_content_manager.git

2. Run the database setup operations

    rake db:create db:migrate db:seed

3. Start the server

    rails s

4. Go to http://localhost:3000 and you'll be in business!

    The system will ask you to create your initial admin user on first use
<commit_msg>Update readme to explain how to use the api<commit_after># Secure Content Manager

Managing your servers passwords and sensitive information.

It also comes with minimal authentication and authorization mechanisms.

It is a working but FAR FROM READY FOR PRODUCTION prototype of what I need. Wait or help with it.

## Ideas in the backlog

- Audit
- Backup solution
- Data Types in the form of plugins (external repositories)
- Some more data types
- etc...

## Getting Started

1. Get the code

        git clone <EMAIL>:tjoyal/secure_content_manager.git

2. Run the database setup operations

        rake db:create db:migrate db:seed

3. Start the server

        rails s

4. Go to http://localhost:3000 and you'll be in business!

        The system will ask you to create your initial admin user on first use

## Api support

While authorisation is not yet granular enough to only grant access to a specific entry,
access through API call is a good start to remove your clear text passwords from your automated script.

This does not necessarely provide you aditionnal security but it allow password management from a central unified interface.

### Step 1 - Generate your key

In your profile generate an api key for your account.


### Step 2 - Grab the request url

Some fields will have an icon to their right(Arrow in a box). Click this icon to add the url identifier to your clipboard.


### Step 3 - Access the information

Though an http query, by adding your api_key to the request, you can fetch the information required.

        Ex.: curl http://localhost:3000/groups/1/servers/1/keys/1/private_key?api_key=f18a471be5795b9f4d41edbfab5248a2


And this is it!

{'fraction_non_alphanumeric': 0.04931285367825384, 'fraction_numerical': 0.01778496362166532, 'mean_word_length': 3.5833333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6658548', 'n_tokens_mistral': 702, 'n_tokens_neox': 651, 'n_words': 359}