From d042b76059784ce0783ad0b00e851a024ff812a3 Mon Sep 17 00:00:00 2001 From: Owen Rubel Date: Sun, 30 Jun 2024 10:28:31 -0700 Subject: [PATCH 1/2] adding config changes --- .iostate/Authority.json | 12 ++ .iostate/Branch.json | 22 +++- .iostate/Company.json | 100 ++++++++++------ .iostate/Dept.json | 28 ++++- .iostate/Hook.json | 75 ++++++++---- .iostate/User.json | 73 ++++++------ boot.sql | 255 ++++++++++++++++++++++++++++++++++++++++ dev/beapi_api.yaml | 20 +++- dev/beapi_db.yaml | 7 +- dev/beapi_mail.yaml | 11 ++ dev/beapi_server.yaml | 29 ++--- prod/beapi_api.yaml | 20 +++- prod/beapi_db.yaml | 4 +- prod/beapi_mail.yaml | 11 ++ prod/beapi_server.yaml | 31 ++--- test/beapi_api.yaml | 20 +++- test/beapi_db.yaml | 12 +- test/beapi_mail.yaml | 11 ++ test/beapi_server.yaml | 29 ++--- 19 files changed, 595 insertions(+), 175 deletions(-) create mode 100644 boot.sql create mode 100644 dev/beapi_mail.yaml create mode 100644 prod/beapi_mail.yaml create mode 100644 test/beapi_mail.yaml diff --git a/.iostate/Authority.json b/.iostate/Authority.json index 9cb4737..61270ba 100644 --- a/.iostate/Authority.json +++ b/.iostate/Authority.json @@ -24,6 +24,12 @@ "create": { "METHOD": "POST", "DESCRIPTION": "Create new Role", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "HOOK": ["ROLE_ADMIN"] @@ -38,6 +44,12 @@ "list": { "METHOD": "GET", "DESCRIPTION": "List all Event Types", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "HOOK": ["ROLE_ADMIN"] diff --git a/.iostate/Branch.json b/.iostate/Branch.json index 73a5bb8..03f24e2 100644 --- a/.iostate/Branch.json +++ b/.iostate/Branch.json @@ -21,10 +21,10 @@ }, "companyId": { "key": "FKEY", - "reference": "company", + "reference": "Company", "type": "Long", "description": "ID for Company", - "mockData": "" + "mockData": "36" } }, "CURRENTSTABLE": "1", @@ -36,6 +36,12 @@ "show": { "METHOD": "GET", "DESCRIPTION": "Description for show", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] @@ -50,6 +56,12 @@ "create": { "METHOD": "POST", "DESCRIPTION": "Description for create", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] @@ -64,6 +76,12 @@ "delete": { "METHOD": "DELETE", "DESCRIPTION": "Description for delete", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] diff --git a/.iostate/Company.json b/.iostate/Company.json index acddbf2..f9b5690 100644 --- a/.iostate/Company.json +++ b/.iostate/Company.json @@ -1,87 +1,115 @@ { "IOSTATE": { "NAME": "company", - "NETWORKGRP": "public", - "VALUES": { + "NETWORKGRP": "private", + "VALUES": { + "name": { + "type": "String", + "description": "", + "mockData": "test" + }, "id": { "key": "PKEY", "type": "Long", "description": "", - "mockData": "", - "constraints": {"order":1}, + "mockData": "112" }, "version": { "type": "Long", "description": "", - "mockData": "", - "constraints": {"order":2,"isNullable":false, "isUnique":false}, - }, - "name": { - "type": "String", - "description": "", - "mockData": "", - "constraints": {"order":3,"isNullable":false, "isUnique":false}, - }, + "mockData": "0" + } }, "CURRENTSTABLE": "1", "VERSION": { "1": { - "DEFAULTACTION":"list", - "URI": { + "DEFAULTACTION": "show", + "_DEPRECATED": "10/10/2050", + "URI": { "show": { "METHOD": "GET", "DESCRIPTION": "Description for show", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { - "BATCH": ["ROLE_ADMIN"] + "BATCH": ["ROLE_ADMIN"], + "CHAIN": ["ROLE_ADMIN"] }, "REQUEST": { - "permitAll": ["id"] + "ROLE_ADMIN": ["id"] }, "RESPONSE": { - "permitAll": ["id","version","name"] + "permitAll": ["id", "version", "name"] } }, - "update": { - "METHOD": "PUT", - "DESCRIPTION": "Description for update", + "create": { + "METHOD": "POST", + "DESCRIPTION": "Description for create", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { - "BATCH": ["ROLE_ADMIN"] + "BATCH": ["ROLE_ADMIN"], + "CHAIN": ["ROLE_ADMIN"] }, "REQUEST": { - "permitAll": ["id","version","name"] + "permitAll": ["name"] }, "RESPONSE": { - "permitAll": ["id"] + "permitAll": ["id", "version", "name"] } }, - "delete": { - "METHOD": "DELETE", - "DESCRIPTION": "Description for delete", + "update": { + "METHOD": "PUT", + "DESCRIPTION": "Description for update", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { - "BATCH": ["ROLE_ADMIN"] + "BATCH": ["ROLE_ADMIN"], + "CHAIN": ["ROLE_ADMIN"] }, "REQUEST": { - "permitAll": ["id"] + "permitAll": ["id", "name"] }, "RESPONSE": { - "permitAll": ["id"] + "permitAll": ["id", "version", "name"] } }, - "create": { - "METHOD": "POST", - "DESCRIPTION": "Description for create", + "delete": { + "METHOD": "DELETE", + "DESCRIPTION": "Description for delete", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { - "BATCH": ["ROLE_ADMIN"] + "BATCH": ["ROLE_ADMIN"], + "CHAIN": ["ROLE_ADMIN"] }, "REQUEST": { - "permitAll": ["id","version","name"] + "permitAll": ["id"] }, "RESPONSE": { "permitAll": ["id"] } - }, + } + } } } } + } diff --git a/.iostate/Dept.json b/.iostate/Dept.json index 1aeee00..0c795b9 100644 --- a/.iostate/Dept.json +++ b/.iostate/Dept.json @@ -21,10 +21,10 @@ }, "branchId": { "key": "FKEY", - "reference": "branch", + "reference": "Branch", "type": "Long", "description": "ID for Branch", - "mockData": "" + "mockData": "36" } }, "CURRENTSTABLE": "1", @@ -36,6 +36,12 @@ "show": { "METHOD": "GET", "DESCRIPTION": "Description for show", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] @@ -50,6 +56,12 @@ "create": { "METHOD": "POST", "DESCRIPTION": "Description for create", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] @@ -64,6 +76,12 @@ "update": { "METHOD": "PUT", "DESCRIPTION": "Description for update", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] @@ -78,6 +96,12 @@ "delete": { "METHOD": "DELETE", "DESCRIPTION": "Description for delete", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"], "CHAIN": ["ROLE_ADMIN"] diff --git a/.iostate/Hook.json b/.iostate/Hook.json index 5eb829e..cea6321 100644 --- a/.iostate/Hook.json +++ b/.iostate/Hook.json @@ -6,44 +6,46 @@ "id": { "key": "PKEY", "type": "Long", + "description":"ID for Hook", "mockData":"1" }, "version": { "type": "Long", + "description":"Version for Updating Hook", "mockData":"0" }, "user": { "key": "FKEY", "type": "Long", + "description":"User relationship", "mockData":"1" }, "name": { "type": "String", + "description":"Name of Hook", "mockData":"mockHook" }, "url": { "type": "String", + "description":"Subscribers Receiving URL for Hook", "mockData":"127.0.0.1:80/test" }, "format": { "type": "String", + "description":"JSON/XML", "mockData":"JSON" }, "service": { "type": "String", - "mockData":"mockService" + "description":"Api Service being Subscribed to", + "mockData":"mockEndpoint" }, - "authorization": { + "authentication": { "type": "String", + "description":"Token type", "mockData":"23978ywe0fdi8h309u4ju0309je3r90f" - }, - "hookServices": { - "type": "List", - "description": "List of endpoints available to be hooked to by user role", - "mockData": "*" } }, - "CURRENTSTABLE": "1", "VERSION": { "1": { @@ -52,17 +54,31 @@ "list": { "METHOD":"GET", "DESCRIPTION":"List Hook", - "ROLES": {}, + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, + "ROLES": { + "BATCH":["ROLE_ADMIN"] + }, "REQUEST": { "permitAll":[] }, "RESPONSE": { - "permitAll":["id","version","user","format","service","authorization"] + "permitAll":["id","version","user","name","url","format","service","authentication"] } }, "show": { "METHOD":"GET", "DESCRIPTION":"Show Hooks", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH":["ROLE_ADMIN"] }, @@ -76,11 +92,17 @@ "create":{ "METHOD":"PUT", "DESCRIPTION":"Create Hook", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH":["ROLE_ADMIN"] }, "REQUEST": { - "permitAll":["name","url","format","service","authorization"] + "permitAll":["name","url","format","service","authentication"] }, "RESPONSE": { "permitAll":["id","version"] @@ -89,11 +111,17 @@ "update": { "METHOD":"POST", "DESCRIPTION":"Update Hook", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH":["ROLE_ADMIN"] }, "REQUEST": { - "permitAll":["id","version","name","url","format","service","authorization"] + "permitAll":["id","version","name","url","format","service","authentication"] }, "RESPONSE": { "permitAll":["id","version"] @@ -102,6 +130,12 @@ "delete":{ "METHOD":"DELETE", "DESCRIPTION":"Delete Hook", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH":["ROLE_ADMIN"] }, @@ -115,6 +149,12 @@ "reset":{ "METHOD":"GET", "DESCRIPTION":"Reset Hook attempts", + "UPDATECACHE": false, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH":["ROLE_ADMIN"] }, @@ -124,17 +164,6 @@ "RESPONSE": { "permitAll":["id"] } - }, - "getHookServices":{ - "METHOD":"GET", - "DESCRIPTION":"get list of hook services", - "ROLES": {}, - "REQUEST": { - "permitAll":[] - }, - "RESPONSE": { - "permitAll":["hookServices"] - } } } } diff --git a/.iostate/User.json b/.iostate/User.json index fd73edc..8f4cac4 100644 --- a/.iostate/User.json +++ b/.iostate/User.json @@ -17,7 +17,7 @@ }, "oauthProvider": { "type": "String", - "mockData": "http:///test.com" + "mockData": "http://test.com" }, "username": { "type": "String", @@ -70,6 +70,12 @@ "show": { "METHOD": "GET", "DESCRIPTION": "Description for show", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"] }, @@ -82,61 +88,73 @@ "ROLE_ADMIN": ["firstName","lastName"] } }, - "showById": { - "METHOD": "GET", - "DESCRIPTION": "Description for show", - "ROLES": { - "BATCH": ["ROLE_ADMIN"] - }, - "REQUEST": { - "ROLE_ADMIN": ["id"] - }, - "RESPONSE": { - "ROLE_ADMIN": ["id", "version", "username", "email", "enabled", "accountExpired","firstName","lastName"] - } - }, "getByUsername": { "METHOD": "GET", "DESCRIPTION": "Description for getByUsername", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"] }, "REQUEST": { - "permitAll": ["username"] + "ROLE_ADMIN": ["username"] }, "RESPONSE": { - "permitAll": ["firstName", "passwordExpired", "accountExpired", "oauthProvider", "username", "accountLocked", "password", "lastName", "oauthId", "enabled", "avatarUrl", "email", "id", "version"] + "permitAll": ["firstName", "passwordExpired", "accountExpired", "username", "accountLocked", "password", "lastName", "enabled", "email", "id", "version"] } }, - "update": { + "updatePassword": { "METHOD": "PUT", "DESCRIPTION": "Description for update", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"] }, "REQUEST": { - "ROLE_ADMIN": ["firstName", "passwordExpired", "accountExpired", "oauthProvider", "username", "accountLocked", "password", "lastName", "oauthId", "enabled", "avatarUrl", "email", "id", "version"] + "permitAll": ["password"], + "ROLE_ADMIN": ["id"] }, "RESPONSE": { - "ROLE_ADMIN": ["id"] + "permitAll": ["id"] } }, "create": { "METHOD": "POST", "DESCRIPTION": "Description for create", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"] }, "REQUEST": { - "permitAll": ["firstName", "passwordExpired", "accountExpired", "oauthProvider", "username", "accountLocked", "password", "lastName", "oauthId", "enabled", "avatarUrl", "email", "id", "version"] + "ROLE_ADMIN": ["firstName", "username", "password", "lastName", "email"] }, "RESPONSE": { - "permitAll": ["id"] + "ROLE_ADMIN": ["id"] } }, "list": { "METHOD": "GET", "DESCRIPTION": "Description for list", + "UPDATECACHE": true, + "RATELIMIT": { + "ROLE_ANONYMOUS": "20", + "ROLE_USER": "100", + "ROLE_ADMIN" : "*" + }, "ROLES": { "BATCH": ["ROLE_ADMIN"] }, @@ -146,19 +164,6 @@ "RESPONSE": { "ROLE_ADMIN": ["id", "version", "username", "email", "enabled", "accountExpired"] } - }, - "delete": { - "METHOD": "DELETE", - "DESCRIPTION": "Description for delete", - "ROLES": { - "BATCH": ["ROLE_ADMIN"] - }, - "REQUEST": { - "permitAll": ["id"] - }, - "RESPONSE": { - "permitAll": ["id"] - } } } diff --git a/boot.sql b/boot.sql new file mode 100644 index 0000000..3543178 --- /dev/null +++ b/boot.sql @@ -0,0 +1,255 @@ +-- MySQL dump 10.19 Distrib 10.2.44-MariaDB, for debian-linux-gnu (x86_64) +-- +-- Host: localhost Database: boot +-- ------------------------------------------------------ +-- Server version 10.2.44-MariaDB-1:10.2.44+maria~bionic + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `arch` +-- + +DROP TABLE IF EXISTS `arch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `arch` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `has_cert` bit(1) NOT NULL, + `url` varchar(255) NOT NULL, + `cert_expiration` datetime DEFAULT NULL, + `master` bit(1) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_hmprayrslvle6kxh3lt6teyga` (`master`), + KEY `arch_master_idx` (`master`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `authentication_token` +-- + +DROP TABLE IF EXISTS `authentication_token`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `authentication_token` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `token_value` varchar(255) NOT NULL, + `username` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `authority` +-- + +DROP TABLE IF EXISTS `authority`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `authority` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `authority` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=812360 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `branch` +-- + +DROP TABLE IF EXISTS `branch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `branch` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `name` varchar(255) NOT NULL, + `company_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `company_id` (`company_id`) +) ENGINE=MyISAM AUTO_INCREMENT=4985 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `company` +-- + +DROP TABLE IF EXISTS `company`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `company` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=5214 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `dept` +-- + +DROP TABLE IF EXISTS `dept`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dept` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `name` varchar(255) NOT NULL, + `branch_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `branch_id` (`branch_id`) +) ENGINE=MyISAM AUTO_INCREMENT=4983 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `hook` +-- + +DROP TABLE IF EXISTS `hook`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hook` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `date_created` bigint(20) DEFAULT NULL, + `service` varchar(255) NOT NULL, + `last_modified` bigint(20) DEFAULT NULL, + `callback` varchar(255) DEFAULT NULL, + `user_id` bigint(20) NOT NULL, + `enabled` bit(1) DEFAULT NULL, + `authorization` varchar(255) DEFAULT NULL, + `attempts` bigint(20) NOT NULL, + `format` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKaihuikmldahp68gmealxg88n5` (`user_id`) +) ENGINE=MyISAM AUTO_INCREMENT=368 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `hook_role` +-- + +DROP TABLE IF EXISTS `hook_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hook_role` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `hook_id` bigint(20) NOT NULL, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `role_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK4c4vis9cjei2l6c7rklveugxm` (`hook_id`), + KEY `FK8l9jmkpllw3899fik0unk6h5g` (`role_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `test` +-- + +DROP TABLE IF EXISTS `test`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `test` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user` +-- + +DROP TABLE IF EXISTS `user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `username` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `uid` varchar(255) DEFAULT NULL, + `first_name` varchar(255) NOT NULL, + `last_name` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `email_verified` bit(1) NOT NULL, + `oauth_id` varchar(255) DEFAULT NULL, + `oauth_provider` varchar(255) DEFAULT NULL, + `avatar_url` varchar(255) DEFAULT NULL, + `enabled` bit(1) NOT NULL, + `account_expired` bit(1) NOT NULL, + `account_locked` bit(1) NOT NULL, + `password_expired` bit(1) NOT NULL, + `throttle_lock` tinyint(1) DEFAULT NULL, + `current_limit` int(11) DEFAULT NULL, + `current_content_length` int(11) DEFAULT NULL, + `registration_verification_code` varchar(65) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_fwmwi44u55bo4rvwsv0cln012` (`email`) +) ENGINE=MyISAM AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_authority` +-- + +DROP TABLE IF EXISTS `user_authority`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_authority` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) NOT NULL, + `authority_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`), + KEY `authority_id` (`authority_id`) +) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_ip` +-- + +DROP TABLE IF EXISTS `user_ip`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_ip` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `version` bigint(20) NOT NULL, + `date_created` datetime NOT NULL, + `ip` varchar(255) NOT NULL, + `user_id` bigint(20) NOT NULL, + `valid` bit(1) NOT NULL, + `hash` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKe9kxf22cy0qh8yop6qf2xfabi` (`user_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-06-30 10:23:22 diff --git a/dev/beapi_api.yaml b/dev/beapi_api.yaml index bf5647e..1bfe3b0 100644 --- a/dev/beapi_api.yaml +++ b/dev/beapi_api.yaml @@ -1,14 +1,23 @@ api: + name: api attempts: 5 procCores: 8 + documentationUrl: 'http://orubel.github.io/Beapi-API-Framework/' + views: ['admin','apidoc','api','login','logout'] reserveduris: ['/authenticate','/register','/error','/login','/logout'] publicEndpoint: ['jwtAuthentication','beapiError'] apiServer: 'http://localhost:8080' apichainLimit: 3 postcrement: false - iostateDir: '.boot/.iostate' + chainingEnabled: true + batchingEnabled: true + encoding: UTF-8 + iostateDir: '.beapi/.iostate' + staticEndpoint: ['apidoc','connector','properties'] serverType: master - configType: large + autoTest: false + parseValidRequestParams: false + supportedFormats: ['JSON','XML'] throttle: active: false rateLimit: {'ROLE_USER':1000} @@ -17,9 +26,14 @@ api: expires: 3600 webhook: active: false + services: ['iostate'] security: + superuserRole: 'ROLE_ADMIN' + userRole: 'ROLE_USER' + anonRole: 'ROLE_ANONYMOUS' + networkGroups: ['open','public','private'] networkRoles: {'open':['ROLE_ADMIN','ROLE_ANONYMOUS','ROLE_USER'],'public':['ROLE_ADMIN','ROLE_USER'],'private':['ROLE_ADMIN']} - corsWhiteList: ['http://localhost','http://localhost:80','http://127.0.0.1','http://test.nosegrind.net'] + corsWhiteList: ['http://localhost','http://localhost:8080','http://127.0.0.1','http://test.nosegrind.net','http://test.nosegrind.net:8080'] bootstrap: superUser: { login: 'admin', diff --git a/dev/beapi_db.yaml b/dev/beapi_db.yaml index ecf0906..36ce8c9 100644 --- a/dev/beapi_db.yaml +++ b/dev/beapi_db.yaml @@ -2,8 +2,8 @@ db: datasource: jmxexport: true driverclassname: "com.mysql.cj.jdbc.Driver" - username: "root" - password: "Ch335eB0y" + username: "db_login" + password: "db_password" url: "jdbc:mysql://localhost:3306/boot?createDatabaseIfNotExist=true&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false" dbCreate: "create-drop" properties: @@ -33,6 +33,3 @@ db: use_query_cache: true provider_class: 'org.hibernate.cache.EhCacheProvider' region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory' - - - diff --git a/dev/beapi_mail.yaml b/dev/beapi_mail.yaml new file mode 100644 index 0000000..15e363f --- /dev/null +++ b/dev/beapi_mail.yaml @@ -0,0 +1,11 @@ +mail: + host: smtp.gmail.com + port: 587 + username: your_email_address@gmail.com + password: your_email_password + registrationValidationCallback: http://something + fromAddress: "noreply@yourdomain.com" + senderName: "Your company name" + smtp: + auth: true + starttls_enable: true diff --git a/dev/beapi_server.yaml b/dev/beapi_server.yaml index 43db07a..acdeb39 100644 --- a/dev/beapi_server.yaml +++ b/dev/beapi_server.yaml @@ -1,26 +1,19 @@ server: - nano: - backgroundProcessorDelay: 5 - maxThreads: 70 - minSpareThreads: 20 - maxConnections: 1000 - uriEncoding: UTF-8 - compression: off - compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - medium: - backgroundProcessorDelay: 5 - maxThreads: 200 - minSpareThreads: 50 - maxConnections: 3000 - uriEncoding: UTF-8 - compression: off - compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - large: + tomcat: backgroundProcessorDelay: 5 maxThreads: 400 minSpareThreads: 100 - maxConnections: 6000 + maxConnections: 100000 uriEncoding: UTF-8 compression: off compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain + application: + context-path: '' + serverURL: "http://yoursite.com:8080" + port: 8080 + ssl: + enabled: false + useForwardHeaders: true + quartz: + pluginEnabled: false diff --git a/prod/beapi_api.yaml b/prod/beapi_api.yaml index bf5647e..1bfe3b0 100644 --- a/prod/beapi_api.yaml +++ b/prod/beapi_api.yaml @@ -1,14 +1,23 @@ api: + name: api attempts: 5 procCores: 8 + documentationUrl: 'http://orubel.github.io/Beapi-API-Framework/' + views: ['admin','apidoc','api','login','logout'] reserveduris: ['/authenticate','/register','/error','/login','/logout'] publicEndpoint: ['jwtAuthentication','beapiError'] apiServer: 'http://localhost:8080' apichainLimit: 3 postcrement: false - iostateDir: '.boot/.iostate' + chainingEnabled: true + batchingEnabled: true + encoding: UTF-8 + iostateDir: '.beapi/.iostate' + staticEndpoint: ['apidoc','connector','properties'] serverType: master - configType: large + autoTest: false + parseValidRequestParams: false + supportedFormats: ['JSON','XML'] throttle: active: false rateLimit: {'ROLE_USER':1000} @@ -17,9 +26,14 @@ api: expires: 3600 webhook: active: false + services: ['iostate'] security: + superuserRole: 'ROLE_ADMIN' + userRole: 'ROLE_USER' + anonRole: 'ROLE_ANONYMOUS' + networkGroups: ['open','public','private'] networkRoles: {'open':['ROLE_ADMIN','ROLE_ANONYMOUS','ROLE_USER'],'public':['ROLE_ADMIN','ROLE_USER'],'private':['ROLE_ADMIN']} - corsWhiteList: ['http://localhost','http://localhost:80','http://127.0.0.1','http://test.nosegrind.net'] + corsWhiteList: ['http://localhost','http://localhost:8080','http://127.0.0.1','http://test.nosegrind.net','http://test.nosegrind.net:8080'] bootstrap: superUser: { login: 'admin', diff --git a/prod/beapi_db.yaml b/prod/beapi_db.yaml index cf1f53c..36ce8c9 100644 --- a/prod/beapi_db.yaml +++ b/prod/beapi_db.yaml @@ -2,8 +2,8 @@ db: datasource: jmxexport: true driverclassname: "com.mysql.cj.jdbc.Driver" - username: "root" - password: "Ch335eB0y" + username: "db_login" + password: "db_password" url: "jdbc:mysql://localhost:3306/boot?createDatabaseIfNotExist=true&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false" dbCreate: "create-drop" properties: diff --git a/prod/beapi_mail.yaml b/prod/beapi_mail.yaml new file mode 100644 index 0000000..15e363f --- /dev/null +++ b/prod/beapi_mail.yaml @@ -0,0 +1,11 @@ +mail: + host: smtp.gmail.com + port: 587 + username: your_email_address@gmail.com + password: your_email_password + registrationValidationCallback: http://something + fromAddress: "noreply@yourdomain.com" + senderName: "Your company name" + smtp: + auth: true + starttls_enable: true diff --git a/prod/beapi_server.yaml b/prod/beapi_server.yaml index 092f9f6..acdeb39 100644 --- a/prod/beapi_server.yaml +++ b/prod/beapi_server.yaml @@ -1,28 +1,19 @@ server: - nano: - backgroundProcessorDelay: 5 - maxThreads: 70 - minSpareThreads: 20 - maxConnections: 1000 - uriEncoding: UTF-8 - compression: off - compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - medium: - backgroundProcessorDelay: 5 - maxThreads: 200 - minSpareThreads: 50 - maxConnections: 3000 - uriEncoding: UTF-8 - compression: off - compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - large: + tomcat: backgroundProcessorDelay: 5 maxThreads: 400 minSpareThreads: 100 - maxConnections: 6000 + maxConnections: 100000 uriEncoding: UTF-8 compression: off compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - - + application: + context-path: '' + serverURL: "http://yoursite.com:8080" + port: 8080 + ssl: + enabled: false + useForwardHeaders: true + quartz: + pluginEnabled: false diff --git a/test/beapi_api.yaml b/test/beapi_api.yaml index bf5647e..1bfe3b0 100644 --- a/test/beapi_api.yaml +++ b/test/beapi_api.yaml @@ -1,14 +1,23 @@ api: + name: api attempts: 5 procCores: 8 + documentationUrl: 'http://orubel.github.io/Beapi-API-Framework/' + views: ['admin','apidoc','api','login','logout'] reserveduris: ['/authenticate','/register','/error','/login','/logout'] publicEndpoint: ['jwtAuthentication','beapiError'] apiServer: 'http://localhost:8080' apichainLimit: 3 postcrement: false - iostateDir: '.boot/.iostate' + chainingEnabled: true + batchingEnabled: true + encoding: UTF-8 + iostateDir: '.beapi/.iostate' + staticEndpoint: ['apidoc','connector','properties'] serverType: master - configType: large + autoTest: false + parseValidRequestParams: false + supportedFormats: ['JSON','XML'] throttle: active: false rateLimit: {'ROLE_USER':1000} @@ -17,9 +26,14 @@ api: expires: 3600 webhook: active: false + services: ['iostate'] security: + superuserRole: 'ROLE_ADMIN' + userRole: 'ROLE_USER' + anonRole: 'ROLE_ANONYMOUS' + networkGroups: ['open','public','private'] networkRoles: {'open':['ROLE_ADMIN','ROLE_ANONYMOUS','ROLE_USER'],'public':['ROLE_ADMIN','ROLE_USER'],'private':['ROLE_ADMIN']} - corsWhiteList: ['http://localhost','http://localhost:80','http://127.0.0.1','http://test.nosegrind.net'] + corsWhiteList: ['http://localhost','http://localhost:8080','http://127.0.0.1','http://test.nosegrind.net','http://test.nosegrind.net:8080'] bootstrap: superUser: { login: 'admin', diff --git a/test/beapi_db.yaml b/test/beapi_db.yaml index 188e28d..36ce8c9 100644 --- a/test/beapi_db.yaml +++ b/test/beapi_db.yaml @@ -2,14 +2,14 @@ db: datasource: jmxexport: true driverclassname: "com.mysql.cj.jdbc.Driver" - username: "root" - password: "Ch335eB0y" + username: "db_login" + password: "db_password" url: "jdbc:mysql://localhost:3306/boot?createDatabaseIfNotExist=true&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false" dbCreate: "create-drop" properties: pooled: true jmxEnabled: true - initialSize: 5 + initialSize: 4 maxActive: 50 minIdle: 5 maxIdle: 25 @@ -21,7 +21,7 @@ db: validationQueryTimeout: 3 validationInterval: 15000 testOnBorrow: true - testWhileIdle: true + testWhileIdle: false testOnReturn: false jdbcInterceptors: "ConnectionState" defaultTransactionIsolation: 2 # "java.sql.Connection.TRANSACTION_READ_COMMITTED" @@ -29,7 +29,7 @@ db: dialect: "org.hibernate.dialect.MySQL5Dialect" show_sql: false cache: - use_second_level_cache: false - use_query_cache: false + use_second_level_cache: true + use_query_cache: true provider_class: 'org.hibernate.cache.EhCacheProvider' region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory' diff --git a/test/beapi_mail.yaml b/test/beapi_mail.yaml new file mode 100644 index 0000000..15e363f --- /dev/null +++ b/test/beapi_mail.yaml @@ -0,0 +1,11 @@ +mail: + host: smtp.gmail.com + port: 587 + username: your_email_address@gmail.com + password: your_email_password + registrationValidationCallback: http://something + fromAddress: "noreply@yourdomain.com" + senderName: "Your company name" + smtp: + auth: true + starttls_enable: true diff --git a/test/beapi_server.yaml b/test/beapi_server.yaml index 43db07a..acdeb39 100644 --- a/test/beapi_server.yaml +++ b/test/beapi_server.yaml @@ -1,26 +1,19 @@ server: - nano: - backgroundProcessorDelay: 5 - maxThreads: 70 - minSpareThreads: 20 - maxConnections: 1000 - uriEncoding: UTF-8 - compression: off - compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - medium: - backgroundProcessorDelay: 5 - maxThreads: 200 - minSpareThreads: 50 - maxConnections: 3000 - uriEncoding: UTF-8 - compression: off - compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain - large: + tomcat: backgroundProcessorDelay: 5 maxThreads: 400 minSpareThreads: 100 - maxConnections: 6000 + maxConnections: 100000 uriEncoding: UTF-8 compression: off compressableMimeTypes: application/json,text/json,application/xml,text/xml,text/plain + application: + context-path: '' + serverURL: "http://yoursite.com:8080" + port: 8080 + ssl: + enabled: false + useForwardHeaders: true + quartz: + pluginEnabled: false From 50085867154a38e0a69d1a59adc4e031704f662b Mon Sep 17 00:00:00 2001 From: Owen Rubel Date: Sun, 30 Jun 2024 10:34:09 -0700 Subject: [PATCH 2/2] Revert "adding iostate files" This reverts commit 41e7fe7e9b7de389e87eeef7da05b35704bc5b04. --- dev/beapi.yaml | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 dev/beapi.yaml diff --git a/dev/beapi.yaml b/dev/beapi.yaml new file mode 100644 index 0000000..e1acfc4 --- /dev/null +++ b/dev/beapi.yaml @@ -0,0 +1,83 @@ +--- +grails: + resources: + pattern: '/**' + cors: + enabled: false + mime: + disable: + accept: + header: + userAgents: + - Gecko + - WebKit + - Presto + - Trident + types: + all: '*/*' + atom: application/atom+xml + css: text/css + csv: text/csv + form: application/x-www-form-urlencoded + html: + - text/html + - application/xhtml+xml + js: text/javascript + json: + - application/json + - text/json + multipartForm: multipart/form-data + rss: application/rss+xml + text: text/plain + hal: + - application/hal+json + - application/hal+xml + xml: + - text/xml + - application/xml + urlmapping: + cache: + maxsize: 1000 + controllers: + upload: + maxFileSize: 26214400 + maxRequestSize: 26214400 + converters: + encoding: UTF-8 + views: + default: + codec: html + gsp: + encoding: UTF-8 + htmlcodec: xml + codecs: + expression: html + scriptlets: html + taglib: none + staticparts: none + + codegen: + defaultPackage: grails.api.framework + mail: + host: 'smtp.gmail.com' + port: 465 + username: 'orubel@gmail.com' + password: 'bllbfmflmbkdmgom' + props: + mail.smtp.auth: 'true' + mail.smtp.socketFactory.port: '465' + mail.smtp.socketFactory.class: 'javax.net.ssl.SSLSocketFactory' + mail.smtp.socketFactory.fallback: 'false' + +app: + name: '@info.app.name@' + version: 0.1 + grailsVersion: '@info.app.grailsVersion@' +spring: + groovy: + template: + check-template-location: false + + + +