Coder Social home page Coder Social logo

linux-system-roles / crypto_policies Goto Github PK

View Code? Open in Web Editor NEW
11.0 10.0 20.0 170 KB

Cryptographic policy management

Home Page: https://linux-system-roles.github.io/crypto_policies/

License: MIT License

Jinja 5.10% JavaScript 11.93% HTML 69.45% Shell 13.52%

crypto_policies's Introduction

crypto_policies

ansible-lint.yml ansible-test.yml markdownlint.yml tft.yml tft_citest_bad.yml woke.yml

This Ansible role manages system-wide crypto policies.

This concept is well adopted since Red Hat Enterprise Linux 8 and in Fedora.

Requirements

See below

Collection requirements

If you want to manage rpm-ostree systems with this role, you will need to install additional collections. Please run the following command line to install the collection.

ansible-galaxy collection install -vv -r meta/collection-requirements.yml

Role Variables

By default, this role will just report system status as described in the following section.

  • crypto_policies_policy

Use this variable to specify the desired crypto policy on the target system, which can be either the base policy or a base policy with subpolicies as accepted by the update-crypto-policies tool. For example FUTURE or DEFAULT:NO-SHA1:GOST. The specified base policy and subpolicies must be available on the target system.

The default value is null meaning the configuration is not changed and the role will just collect the facts below.

The list of available base policies on the target system can be found in the crypto_policies_available_policies variable and the list of available subpolicies can be found in the crypto_policies_available_subpolicies variable.

  • crypto_policies_reload

By default (true), updating crypto policies forces reload of some of the daemons affected by crypto policies in the system. Setting false prevents this behavior and is helpful if the role is executed during system enrollment or some other follow-up tasks is expected to do it later.

  • crypto_policies_reboot_ok

Crypto policies can not know all the custom applications using crypto libraries that are affected by change of crypto policies so it is recommended to reboot after changing crypto policies to make sure all of the services and applications will read the new configuration files. By default (false), if reboot is required, this role will set crypto_policies_reboot_required variable as described below and it is up to the user of the role to reboot the system afterwards, for example after applying some other changes that might need reboot. If there are no other tasks in the playbook that require reboot, you can set this value to true and this role will handle the reboot for you, when needed.

  • crypto_policies_transactional_update_reboot_ok

This variable is used to handle reboots required by transactional updates. If a transactional update requires a reboot, the role will proceed with the reboot if crypto_policies_transactional_update_reboot_ok is set to true. If set to false, the role will notify the user that a reboot is required, allowing for custom handling of the reboot requirement. If this variable is not set, the role will fail to ensure the reboot requirement is not overlooked.

Variables Exported by the Role

  • crypto_policies_active

This fact contains the currently active policy name in the format as accepted by crypto_policies_policy variable above.

  • crypto_policies_available_policies

This is a list of all base policies available on the target system. Custom policy files can be installed by copying the .pol files into /etc/crypto-policies/policies directory (not implemented in this role yet).

  • crypto_policies_available_subpolicies

This is a list of all subpolicies available on the target system. Custom subpolicies can be installed by copying the .pmod files into /etc/crypto-policies/policies/modules directory (not implemented in this role yet).

  • crypto_policies_available_modules

Deprecated alias to crypto_policies_available_subpolicies.

  • crypto_policies_reboot_required

Default false - if true, this means a reboot is needed to apply the changes made by the role

Example Playbook

The following playbook configures the system to the default crypto policy level without SHA1. The update is done without reboot (which is recommended to do by the user afterwards).

- name: Manage crypto policies
  hosts: all
  roles:
    - role: linux-system-roles.crypto_policies
      vars:
        crypto_policies_policy: "DEFAULT:NO-SHA1"
        crypto_policies_reload: false

rpm-ostree

See README-ostree.md

License

MIT, see the file LICENSE for more information.

Author Information

Jakub Jelen, 2020

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.