com.hack23.cia:encrypt.properties

parent-web-pom


Keywords
civic-tech, committee, esv, government-data, help-wanted, kpi, ministries, open-data, osint, parliament-charts, parliamentary-monitoring, politicians, politics, riksdagen, surveillance, sweden, voting-data, worldbank
License
Apache-2.0

Documentation

Citizen Intelligence Agency

The Citizen Intelligence Agency is a volunteer-driven, open-source intelligence (OSINT) project focusing on political activity in Sweden. By monitoring key political figures and institutions, the platform provides valuable insights into financial performance, risk metrics, and political trends. The dashboard features a ranking system, enabling users to objectively compare politicians based on performance. The initiative is independent and non-partisan, seeking to encourage informed decision-making, enhance transparency in governance, and cultivate an engaged and well-informed citizenry.

About Hack23

Data Sources

The project relies on open data from various sources, including:

Badges

license FOSSA Status CLA assistant Maven Central CII Best Practices OpenSSF Scorecard CodeFactor Maintainability codebeat badge DepShield Badge Average time to resolve an issue Percentage of issues still open

Runtime(JDK 21+)

[JDK-21] [JDK-22]

Resources

  • Project Documentation
  • Project Architecture - Delve into the architecture of the Citizen Intelligence Agency. This overview provides a look at the enterprise context, system context, system containers, web application components, deployment strategy, and AWS account structure of the project.
  • Entity Model - Explore our Entity Model which provides a detailed look at the entities in our system and their relationships. This page is particularly useful for understanding the data structure of our project.
  • Api docs - Access the API documentation for the Citizen Intelligence Agency project. This documentation provides a detailed view of the various packages within the system, helping developers understand and work with the project's API.

Citizen Intelligence Agency - Sweden Political Activity Dashboard

Welcome to the Citizen Intelligence Agency - Sweden Political Activity Dashboard repository. This project provides a comprehensive and neutral dashboard focusing on political activity in Sweden. By monitoring key political figures and institutions, we offer valuable insights into financial performance, risk metrics, and political trends.

Our dashboard offers a detailed overview of political figures, comprehensive data on various ministries, performance metrics, and visual data representation. Check out our dashboard.md for more details.

Medborgarunderrättelsebyrån - Sverige Politisk aktivitetsdashboard

Medborgarunderrättelsebyrån tillhandahåller en neutral och omfattande dashboard som fokuserar på politisk aktivitet i Sverige. Genom att övervaka nyckelpolitiska figurer och institutioner erbjuder plattformen värdefulla insikter i finansiell prestanda, riskmetriker och politiska trender. Detta projekt drivs av avancerade AI-teknologier som OpenAI och datavisualiseringsverktyg som Daigram.

Vår dashboard erbjuder en detaljerad översikt över politiska figurer, omfattande data om olika departement, prestandametriker och visuell datarepresentation. Kolla in vår dashboard_sv.md för mer information.

AI and Data Visualization

This project is powered by advanced AI technologies like OpenAI for data processing and analysis. We use AI to process and analyze a large amount of data from various open sources such as the Swedish Parliament, Swedish Election Authority, World Bank, and the Swedish National Financial Management Authority. The analyzed data is then represented visually through data visualization tools like Daigram.

Reporting Security Issues

Please follow the instructions in our SECURITY.md file for reporting security issues.

Here's an updated README.md section with a link to the CloudFormation stack file and instructions on how to launch it in AWS:

Deploying to AWS using CloudFormation

The Citizen Intelligence Agency (CIA) project can be deployed on AWS using the provided CloudFormation stack file. This file is located in the cia-dist-cloudformation/src/main/resources/cia-dist-cloudformation.json folder.

You can find the CloudFormation stack file here.

Launching the CloudFormation Stack

To launch the CloudFormation stack, follow these steps:

  1. Log in to your AWS Management Console.

  2. Navigate to the CloudFormation service.

  3. Click on Create stack.

  4. In the Select Template section, choose Upload a template file and upload the cia-dist-cloudformation.json file.

  5. Click Next.

  6. Fill out the Stack name and any required parameters. The parameters are described in the CloudFormation stack file. Adjust them according to your requirements.

  7. Click Next to configure stack options. You can add tags or configure advanced options as needed.

  8. Click Next to review your stack settings. Make sure everything is set up as desired.

  9. In the Capabilities section, check the boxes for the following options:

    • I acknowledge that AWS CloudFormation might create IAM resources.
    • I acknowledge that AWS CloudFormation might create IAM resources with custom names.
  10. Click Create stack to start the stack creation process. AWS CloudFormation will create the required resources and deploy the CIA project.

  11. Once the stack creation process is complete, you can access the application by navigating to the output URL provided in the CloudFormation stack Outputs tab.

Installing Debian/Ubuntu package

This guide will walk you through installing the CIA project on Debian and Ubuntu 22.4+ systems.

Prerequisites

  1. Install OpenJDK and PostgreSQL:
$ sudo apt-get install openjdk-21-jdk postgresql-15 pgadmin3
  1. Install PostgreSQL on Ubuntu:
$ sudo apt-get install postgresql-15 postgresql-contrib postgresql-15-pgaudit

Database Setup

  1. Create an empty database:

Below instructions set the default username/password and database name used for development. We recommend using custom credentials and updating the configuration at /opt/cia/webapps/cia/WEB-INF/database.properties to define your own username/password and database name.

$ sudo su - postgres
$ psql
postgres=# CREATE USER eris WITH password 'discord';
postgres=# CREATE DATABASE cia_dev;
postgres=# GRANT ALL PRIVILEGES ON DATABASE cia_dev to eris;

PostgreSQL Configuration

  1. Enable prepared transactions and required extensions:

Edit /etc/postgresql/15/main/postgresql.conf and set:

max_prepared_transactions = 100
shared_preload_libraries = 'pg_stat_statements, pgaudit, pgcrypto'
pgaudit.log = ddl
pg_stat_statements.track = all
pg_stat_statements.max = 10000
  1. Modify PostgreSQL settings:

Edit /etc/postgresql/15/main/pg_hba.conf and add the following line:

host all all ::1/128 md5
  1. Restart PostgreSQL:
$ service postgresql restart

Install CIA Debian Package

  1. Download the CIA Debian package:
$ wget https://oss.sonatype.org/content/repositories/releases/com/hack23/cia/cia-dist-deb/2022.12.26/cia-dist-deb-2022.12.26.deb
  1. Install the Debian package:
$ sudo dpkg -i cia-dist-deb-2022.12.26.deb

Access the Server

  1. Access the server at https://localhost:28443/cia/.

Diagrams

  • Cloudformation stack Diagram
  • Package overview diagram