From b66e2baecdfd8173ff91cd8ee4716bc7ea36b6a6 Mon Sep 17 00:00:00 2001 From: Hayden Date: Sun, 11 Feb 2024 23:07:15 +0000 Subject: [PATCH] Begin initial work on YNHifying the thing --- config/database.yml | 87 --------------------------------------------- config/ldap.yml | 58 ------------------------------ config/storage.yml | 34 ------------------ 3 files changed, 179 deletions(-) delete mode 100644 config/database.yml delete mode 100644 config/ldap.yml delete mode 100644 config/storage.yml diff --git a/config/database.yml b/config/database.yml deleted file mode 100644 index 28f3b34..0000000 --- a/config/database.yml +++ /dev/null @@ -1,87 +0,0 @@ -# PostgreSQL. Versions 9.1 and up are supported. -# -# Install the pg driver: -# gem install pg -# On OS X with Homebrew: -# gem install pg -- --with-pg-config=/usr/local/bin/pg_config -# On OS X with MacPorts: -# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config -# On Windows: -# gem install pg -# Choose the win32 build. -# Install PostgreSQL and put its /bin directory on your path. -# -# Configure Using Gemfile -# gem 'pg' -# -default: &default - adapter: postgresql - encoding: unicode - # For details on connection pooling, see Rails configuration guide - # http://guides.rubyonrails.org/configuring.html#database-pooling - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - -development: - adapter: sqlite3 - encoding: unicode - database: db/ac2_dev.sqlite3 - - # The specified database role being used to connect to postgres. - # To create additional roles in postgres see `$ createuser --help`. - # When left blank, postgres will use the default role. This is - # the same name as the operating system user that initialized the database. - #username: google_oauth_devise - - # The password associated with the postgres role (username). - #password: - - # Connect on a TCP socket. Omitted by default since the client uses a - # domain socket that doesn't need configuration. Windows does not have - # domain sockets, so uncomment these lines. - #host: localhost - - # The TCP port the server listens on. Defaults to 5432. - # If your server runs on a different port number, change accordingly. - #port: 5432 - - # Schema search path. The server defaults to $user,public - #schema_search_path: myapp,sharedapp,public - - # Minimum log levels, in increasing order: - # debug5, debug4, debug3, debug2, debug1, - # log, notice, warning, error, fatal, and panic - # Defaults to warning. - #min_messages: notice - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - encoding: unicode - database: db/ac2_test.sqlite3 - -# As with config/secrets.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password as a unix environment variable when you boot -# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full rundown on how to provide these environment variables in a -# production deployment. -# -# On Heroku and other platform providers, you may have a full connection URL -# available as an environment variable. For example: -# -# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" -# -# You can use this database configuration with: -# -# production: -# url: <%= ENV['DATABASE_URL'] %> -# -production: - <<: *default - database: google_oauth_devise_production - username: google_oauth_devise - password: <%= ENV['GOOGLE_OAUTH_DEVISE_DATABASE_PASSWORD'] %> diff --git a/config/ldap.yml b/config/ldap.yml deleted file mode 100644 index 6afa181..0000000 --- a/config/ldap.yml +++ /dev/null @@ -1,58 +0,0 @@ -## Authorizations -# Uncomment out the merging for each environment that you'd like to include. -# You can also just copy and paste the tree (do not include the "authorizations") to each -# environment if you need something different per environment. -authorizations: &AUTHORIZATIONS - allow_unauthenticated_bind: false - group_base: ou=groups,dc=test,dc=com - ## Requires config.ldap_check_group_membership in devise.rb be true - # Can have multiple values, must match all to be authorized - required_groups: - # If only a group name is given, membership will be checked against "uniqueMember" - - cn=admins,ou=groups,dc=test,dc=com - - cn=users,ou=groups,dc=test,dc=com - # If an array is given, the first element will be the attribute to check against, the second the group name - - ["moreMembers", "cn=users,ou=groups,dc=test,dc=com"] - ## Requires config.ldap_check_attributes in devise.rb to be true - ## Can have multiple attributes and values, must match all to be authorized - require_attribute: - objectClass: inetOrgPerson - authorizationRole: postsAdmin - ## Requires config.ldap_check_attributes_presence in devise.rb to be true - ## Can have multiple attributes set to true or false to check presence, all must match all to be authorized - require_attribute_presence: - mail: true - telephoneNumber: true - serviceAccount: false - -## Environment - -development: - host: localhost - port: 389 - attribute: cn - base: ou=people,dc=test,dc=com - admin_user: cn=admin,dc=test,dc=com - admin_password: admin_password - ssl: false - # <<: *AUTHORIZATIONS - -test: - host: localhost - port: 3389 - attribute: cn - base: ou=people,dc=test,dc=com - admin_user: cn=admin,dc=test,dc=com - admin_password: admin_password - ssl: simple_tls - # <<: *AUTHORIZATIONS - -production: - host: localhost - port: 636 - attribute: cn - base: ou=people,dc=test,dc=com - admin_user: cn=admin,dc=test,dc=com - admin_password: admin_password - ssl: start_tls - # <<: *AUTHORIZATIONS diff --git a/config/storage.yml b/config/storage.yml deleted file mode 100644 index d32f76e..0000000 --- a/config/storage.yml +++ /dev/null @@ -1,34 +0,0 @@ -test: - service: Disk - root: <%= Rails.root.join("tmp/storage") %> - -local: - service: Disk - root: <%= Rails.root.join("storage") %> - -# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) -# amazon: -# service: S3 -# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> -# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> -# region: us-east-1 -# bucket: your_own_bucket - -# Remember not to checkin your GCS keyfile to a repository -# google: -# service: GCS -# project: your_project -# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> -# bucket: your_own_bucket - -# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) -# microsoft: -# service: AzureStorage -# storage_account_name: your_account_name -# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> -# container: your_container_name - -# mirror: -# service: Mirror -# primary: local -# mirrors: [ amazon, google, microsoft ]