Skip to content
Snippets Groups Projects
  1. Nov 25, 2020
    • Benjamin Bertrand's avatar
      Improve logging · 239d9edf
      Benjamin Bertrand authored
      - Remove extra handler - flask default handler is fine (everything was
        logged twice due to changes in flask 1.0)
      - Add more logging messages
      
      JIRA INFRA-2899 #action In Progress
      239d9edf
  2. Oct 27, 2020
  3. Feb 21, 2020
    • Benjamin Bertrand's avatar
      Add app version in navbar · 626f22d9
      Benjamin Bertrand authored
      The version file is created when building the docker image
      using the git tag.
      
      Switch to calendar versioning
      
      JIRA INFRA-1789 #action In Progress
      626f22d9
  4. Apr 23, 2019
  5. Mar 05, 2019
    • Benjamin Bertrand's avatar
      Remove tags and add is_ioc field to host table · f331b452
      Benjamin Bertrand authored
      Tags were basically only used for IOCs.
      Tags were linked to the interface (and not the host).
      But for IOC we assume it should always be the main (first) interface.
      
      Using a field on the host table will make it more obvious for users.
      
      Created a IOC dynamic group type, to create a group including all IOCs
      
      JIRA INFRA-862 #action In Progress
      f331b452
  6. Nov 30, 2018
  7. Oct 11, 2018
  8. Oct 05, 2018
  9. Sep 14, 2018
  10. Aug 02, 2018
    • Benjamin Bertrand's avatar
      Remove flask-bootstrap dependency · 7c98683d
      Benjamin Bertrand authored
      The official flask-bootstrap is still not compatible with bootstrap 4.
      The application basically only uses the main template and one macro.
      It's easier to include directly bootstrap in CSEntry.
      It makes upgrading to the latest bootstrap much easier and removes a
      dependency.
      
      Update to bootstrap 4.1.3
      
      Added:
      - jquery-3.3.1.min.js
      - bootstrap.bundle.min.js (include popper but not jquery)
      
      Note that jquery.slim can't be used.
      We need for example $.getJSON for datatables.
      7c98683d
  11. Jul 12, 2018
    • Benjamin Bertrand's avatar
      Add ansible_group table · 5e76c0b1
      Benjamin Bertrand authored
      - add ansible_groups_hosts_table for many-to-many relationship between
      groups and hosts
      - add new api endpoint /network/groups
      
      JIRA INFRA-412
      5e76c0b1
  12. Jul 11, 2018
  13. Jul 06, 2018
  14. Jul 02, 2018
  15. Apr 27, 2018
    • Benjamin Bertrand's avatar
      Add RQ Dashboard blueprint · f384a9da
      Benjamin Bertrand authored
      - RQ Dashboard shall only be accessible to admin users
      - "REDIS_URL" is hard-coded in rq-dashboard (had to rename RQ_REDIS_URL)
      f384a9da
    • Benjamin Bertrand's avatar
      Change Flask-Session redis_store config_prefix · a17dfd20
      Benjamin Bertrand authored
      The "REDIS_URL" variable is hard-coded in RQ Dashboard.
      
      REDIS_URL was used by redis_store that is passed to Flask Session.
      The url variable used by Flask-Redis can be changed by setting the
      config_prefix.
      
      1. Rename REDIS_URL to SESSION_REDIS_URL
      2. Rename redis_store to session_redis_store
      3. Use "SESSION_REDIS" config_prefix to initialize session_redis_store
      
      This makes it clear that this Redis instance is used by Flask-Session.
      REDIS_URL will be used for RQ.
      a17dfd20
  16. Apr 10, 2018
  17. Apr 06, 2018
  18. Feb 12, 2018
  19. Feb 09, 2018
    • Benjamin Bertrand's avatar
      Add domain table · f627e2c9
      Benjamin Bertrand authored
      - add domain_id on NetworkScope table to define a default domain
      - add domain_id on Network (default to the Network Scope one)
      
      Fixes INFRA-194
      f627e2c9
  20. Jan 16, 2018
  21. Jan 12, 2018
    • Benjamin Bertrand's avatar
      Cache user retrieval · 0efae3a3
      Benjamin Bertrand authored
      The user_id is stored in the flask session. On every page load, we query
      the database to get:
      - the user objet (user_account table)
      - the user's groups (group table) to know what the user can access
      
      If we try to cache the user_load function, the following error is raised
      when retrieving the groups:
      sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at
      0x7f51e050a940> is not bound to a Session; lazy load operation of
      attribute 'grp' cannot proceed
      
      The groups from AD are only stored to map them with CSENTRY_LDAP_GROUPS.
      We don't do any query on them (get all users from one group).
      As we always query them with one user, it's more efficient to store them
      in the user_account table as an array than in a separate table.
      This allows to easily cache the load_user function.
      
      Note that we have to remember to add the current_user to the sqlalchemy session if
      we want to modify it or access a relationship (like tokens)!
      
      The load_user function is now cached for 30 minutes. This decreases a
      lot the number of database queries.
      
      Fix INFRA-156
      0efae3a3
  22. Jan 05, 2018
  23. Jan 02, 2018
  24. Dec 21, 2017
    • Benjamin Bertrand's avatar
      Add API to create users · 5e8b9d5c
      Benjamin Bertrand authored
      Required to create users when importing items from JIRA.
      
      Renamed blueprint from "users" to "user" to be consistent with other
      blueprints (inventory and network).
      5e8b9d5c
    • Benjamin Bertrand's avatar
      Refactor API · 77468350
      Benjamin Bertrand authored
      Split API in different blueprints like for the web UI:
      - users (login)
      - inventory
      - network
      
      Use version in API url (api/v1) to make future changes easier without
      breaking backward compatibility
      77468350
  25. Dec 15, 2017
  26. Dec 14, 2017
  27. Dec 13, 2017
    • Benjamin Bertrand's avatar
      Add server side session using Flask-Session · d5d3530a
      Benjamin Bertrand authored
      In Flask, session data are stored in a cookie by default.
      Using a server side session, there is no risk of putting too much data
      in the session and transmissting a big cookie on every request
      (only an id is sent in the cookie).
      
      Redis is used as backend (without persistent storage).
      d5d3530a
    • Benjamin Bertrand's avatar
      Split main blueprint · 014f3734
      Benjamin Bertrand authored
      main blueprint splitted in:
      - inventory
      - networks
      014f3734
    • Benjamin Bertrand's avatar
      Refactor database schema · a5963f99
      Benjamin Bertrand authored
      - Rename Host to Interface
      - Create new Host table to group interfaces
      a5963f99
    • Benjamin Bertrand's avatar
      Add token revoking · c5965f94
      Benjamin Bertrand authored
      - All created tokens are stored in the database.
        To revoke a token, we just delete it from the database.
        Tokens not found in the database are thus considered unvalid / revoked.
      
      - Add button to copy generated token to the clipboard
      
      - Redesign profile page
      c5965f94
  28. Dec 06, 2017
  29. Nov 20, 2017
Loading