Skip to main content

A library for secure password handling.

Project description

CryptoLibrary is a library for secure password handling. project page

For more information about Robot Framework, see http://robotframework.org.


Installation

If you already have Python >= 3.6 with pip installed, you can simply run:

pip install --upgrade robotframework-crypto

or if you have Python 2 and 3 installed in parallel you may use

pip3 install --upgrade robotframework-crypto

If you have Python 2 … i am very sorry! Please update!


How it works

CryptoLibrary uses asymmetric crypto with elliptic curve cryptography to store confidential data securely.

With python -m CryptoLibrary you can generate a key pair (private and public key) for your test env. You will get the public key after generating.

this public key can now be used to encrypt every data you do not want to be public. Passwords, personal data, etc.

you can use python -m CryptoClient on you computer where you want to encrypt data. Encrypted Data will look like this:

tIdr5s65+ggfJZl46pJgljioCUePUdZLozgiwquznw+xSlmzT3dcvfrTL9wIdRwmNOJuONT7FBW5

this encrypted data can now be decrypted with CryptoLibrary within RobotFramework.

CryptoLibrary need the private_key_store.json for this. This is what is generated as key pair. Private key can be imported in test env with python -m CryptoLibrary .


Suppressing encrypted Text from Logs

All Data that is decrypted by CryptoLibrary is replaced in the log by *** This works always and can not be disabled. No need to use special keywords for this.


Usage in Test

*** Settings ***
Resource    imports.resource
Library     CryptoLibrary    ${decryption_password}    #private key which should be secret is also protected by a password

*** Variables ***
${secret}=     KILL ALL HUMANS!!!
${enc_user}=   nkpEPOVKfOko3t04XxOupA+F/ANTEuR9aQuPaPeMBGBQenwYf6UNESEl9MWRKGuj60ZWd10=
${enc_pwd}=    TVpamLXCtrzRsl8UAgD0YuoY+lSJNV73+bTYhOP51zM1GQihgyCvSZ2CoGoKsUHLFjokyJLHxFzPEB4=

*** Test Cases ***
Valid Login
    Open Browser    ${BASE-URL}
    Suppress Logging                                  #disable Robot Framework logging
    ${var}=    set Variable   ${secret}
    Log    ${var}
    Suppress Logging    False                         #disable Robot Framework logging
    Decrypt Text To Variable    user    ${enc_user}   #puts the decrypted pain text into ${user}
    ${var2}=    set Variable    ${user}
    log    ${var2}
    Input Text      id:input_username    ${user}
    ${password}=    Get Decrypted Text    ${enc_pwd}  #decrypts cipher text and returns plain text
    Input Password    id:input_password    ${password}
    Click Button    id:button_login
    Page Should Contain Element    //a[text()='Logout']
    Location Should Be    ${BASE-URL}list
    [Teardown]   Close Browser

in this case the decryption password for the private key. It can also be saved on test env persistently as a hash.

THIS IS JUST AN ALPHA VERSION !!11!!1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-crypto-0.2.0.tar.gz (62.6 kB view details)

Uploaded Source

Built Distribution

robotframework_crypto-0.2.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file robotframework-crypto-0.2.0.tar.gz.

File metadata

  • Download URL: robotframework-crypto-0.2.0.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for robotframework-crypto-0.2.0.tar.gz
Algorithm Hash digest
SHA256 08292ab1a212de209f035bbd369ee4dbed34abb8b096764503d481a059cd77c3
MD5 e110ffaf9c1b33c8f636d96ab63a961a
BLAKE2b-256 bd88db6e117729df8abcdd37344313466de66208017010bbde77b387933f3420

See more details on using hashes here.

Provenance

File details

Details for the file robotframework_crypto-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: robotframework_crypto-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for robotframework_crypto-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53eb63c434f61635a10ff921f8bb17b3ede723b1dedf8ca53bfef39268a61f94
MD5 0131377d427c96fb39ecdd32b9428880
BLAKE2b-256 533dbb21d1aa2d2711a77fb2841c766f9b2ff9e856ea92d2b8c5eef92ce46573

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page