logo

한국어

[AppDefender] postgresSQL 접근 방법

관리자 2019.01.17 17:48 조회 수 : 4

###########################################################

#

# /var/lib/postgresql/data/postgresql.conf

#

###########################################################

# docker ps | grep postgres
# docker exec -it postgres /bin/bash

###########################################################
#
# 여기부터 postgres의 docker 내부
#
###########################################################
# su - postgres
$ psql db_appdefender -U postgres

-- Database 조회
\list

-- 현재 DB의 전체 스키마 조회
SELECT NSPNAME FROM PG_CATALOG.PG_NAMESPACE;

-- 전체 테이블 조회
SELECT TABLENAME FROM PG_TABLES;

-- 모든 스키마와 테이블 보기
SELECT TABLE_SCHEMA,TABLE_NAME FROM INFORMATION_SCHEMA.TABLES ORDER BY TABLE_SCHEMA,TABLE_NAME;

-- 끝내기
\q


-- Application Defender 테이블 조회
SELECT * FROM auth_data.hp_sso_license;
SELECT * FROM auth_data.integration;
SELECT * FROM auth_data.invalid_cat_door_token;
SELECT * FROM auth_data.nonce;
SELECT * FROM auth_data.role;
SELECT * FROM auth_data.tenant;
SELECT * FROM auth_data.tenant_metrics;
SELECT * FROM auth_data.user_account;
SELECT * FROM auth_data.user_role;
SELECT * FROM global_metadata.agent_binary_version;
SELECT * FROM global_metadata.blacklisted_domain;
SELECT * FROM global_metadata.category_snapshot;
SELECT * FROM global_metadata.certificate_config;
SELECT * FROM global_metadata.defender_version;
SELECT * FROM global_metadata.global_blobs;
SELECT * FROM global_metadata.language_snapshot;
SELECT * FROM global_metadata.rulepack_category;
SELECT * FROM global_metadata.rulepack_parameter;
SELECT * FROM global_metadata.rulepack_version;
SELECT * FROM global_metadata.schema_version;
SELECT * FROM global_metadata.snapshot_instance;
SELECT * FROM global_metadata.system_config;
SELECT * FROM global_metadata.tenant_snapshot;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.tenant_config;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.security_log_setting;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.ping_record;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.notification_aud;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.notification;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.licensed_agent_delta;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.alert_definition_aud;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.alert_condition_aud;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.agent_system_environment;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.agent_states;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.agent_log_file;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.agent_group_custom_rulepack_version;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.agent_config;
SELECT * FROM td3f1a94d8560493cb65250f2358c0c3b.active_agent_count;