Connecting Logo Bordro Plus or Logo J-HR payroll tables directly to an ERP AI assistant is one of the fastest ways to trigger a reportable KVKK and GDPR breach. Across Turkish industrial groups, administrators routinely host Logo Tiger financial databases on the same Microsoft SQL Server instance that stores statutory compensation tables for Logo Bordro Plus or Logo J-HR. Attaching a generic Text-to-SQL Model Context Protocol (MCP) connector to that shared SQL login silently grants the model read visibility into every payroll card on the server.
Controllers and plant directors still need labor intelligence, from overtime drift to active turnstile headcount on a bottleneck line. Delivering those answers safely requires a hard architectural boundary between person-level statutory payroll records and aggregated capacity metrics.
Why shared SQL Server instances turn raw MCP connectors into a KVKK breach
In standard on-premises installations, Logo Tiger writes commercial and accounting transactions into company-numbered and period-numbered tables such as LG_001_01_INVOICE and LG_001_01_EMFLINE. Right beside them, either inside the same database catalog or in a sibling database mapped to the same db_owner or sa integration account, Logo Bordro Plus maintains non-period-split human-resources tables prefixed with LH_001_ (such as LH_001_PERCARD, LH_001_PNTCARD, LH_001_PAYPERD, and LH_001_PERIDINF), while Logo J-HR stores rich personnel, organization, and statutory calculation histories across its relational schema.
Pointing an unguarded SQL connector or schema-introspection agent at that shared SQL Server instance exposes four categories of regulated personal and special-category data protected under KVKK Articles 6 and 12 and GDPR Articles 9 and 32:
- Executive and individual net pay: monthly timesheet and accrual rows in
PNTCARDhold exact base wages, bonus lines, fringe benefits, IBAN bank accounts, and net take-home pay for every employee up to board members. - Statutory severance reserves (kidem ve ihbar tazminati): tenure timestamps, gross-up ceilings, and individual termination reserve calculations reveal confidential restructuring plans and executive exit packages.
- Court-ordered wage garnishments (icra kesintileri): enforcement-office docket numbers, creditor deductions, and maintenance orders attached to payroll deductions expose acute personal financial distress.
- SGK health, maternity, and disability codes: social-security incapacity reports (
SGK istirahat), occupational illness flags, and statutory disability tax-relief tiers (engellilik indirimi) constitute special-category health data that carries severe statutory penalties when processed outside explicit HR authorization boundaries.
As we outlined when connecting Logiwa, FineWMS, and Kolay IK with ERP AI, relying on system-prompt rules telling an assistant never to display employee salaries offers zero legal or technical defense. Any user can reframe a prompt around average labor cost in a single-person cost center, request SQL diagnostic output, or probe catalog views to read raw payroll rows.
Implementing the three-layer payroll hard-block across every role
A defensible enterprise AI deployment treats statutory payroll isolation as an infrastructure invariant rather than a conversational guideline. Instead of trusting a model to self-censor SQL queries, engineering teams enforce a three-layer payroll hard-block across the connector stack:
Layer 1: SQL Server credential DENY on payroll schemas and tables
The AI integration connector must never authenticate with sa, db_owner, or the ERP application service account. Provision a dedicated read-only SQL login mapped only to required commercial views, and issue explicit DENY SELECT and DENY VIEW DEFINITION statements on every LH_* table, every Logo J-HR personnel and accrual object, and any custom payroll staging table. Because DENY takes absolute precedence over GRANT and role memberships like db_datareader inside the SQL Server engine, even a compromised query string receives an immediate engine-level permission refusal.
Layer 2: Deterministic SQL AST table and join blocklist
Before any generated or templated read query touches the database driver, a deterministic SQL abstract syntax tree (AST) validator parses every table identifier, common table expression, subquery, catalog view (sys.tables, INFORMATION_SCHEMA.COLUMNS), and OPENQUERY call. Any statement referencing payroll prefixes (LH_, JHR_), national identity columns (TCKNO), or bank account fields is rejected in milliseconds and written to an immutable security audit log before execution.
Layer 3: Ontology never-exposed policy, including admin and c-level chat
A frequent governance mistake is granting admin or c-level chat roles bypass access to payroll objects. In an ontology backed by governed MCP tool definitions, individual salary, kidem and ihbar severance, icra garnishment, and SGK health attributes carry an exposure: never policy enforced equally on administrators, CFOs, and chief executives in chat sessions. Chat logs, browser caches, and external LLM context windows are never compliant surfaces for personal payslips. Authorized executives inspect individual compensation directly inside Logo Bordro Plus or Logo J-HR under native audit logging.
Exposing cost-center labor budgets and overtime ratios without person rows
Hard-blocking payroll tables does not blind financial controllers or operations leads. When Logo Bordro Plus or Logo J-HR closes a monthly payroll period, its accounting bridge posts a summarized payroll journal voucher (bordro tahakkuk mahsup fisi) into Logo Tiger general-ledger accounts under the Turkish Uniform Chart of Accounts (TDHP):
- Direct production labor (TDHP 720): gross shift wages, employer
SGKpremiums, and overtime premiums allocated to production cost centers (masraf merkezleri). - Manufacturing overhead and indirect labor (TDHP 730): maintenance technicians, quality inspectors, warehouse handlers, and shift supervisors rolled up by plant department.
- General, administrative, and sales labor (TDHP 760 and 770): department-level budget versus actual payroll totals paired with short-term accrual balances in
335,360, and361.
By modeling these cost-center ledger postings alongside k-anonymity cohort thresholds (requiring at least five active employees per cost center before returning summary overtime or headcount ratios), finance and plant leaders can ask why weekday 150-percent or weekend 200-percent overtime spiked in the press shop without ever touching an individual payslip row. Those verified labor rates feed directly into shop-floor variance workflows like the ones covered in Doruk ProManage MES downtime and ERP costing data for AI.
Connecting Firebird and Perkotek PDKS attendance and polyvalence matrices safely
For daily shift planning, plant managers never need personal salaries. They need to know how many certified operators badged through the turnstiles at 07:00 and whether a stamping line has a qualified backup setter. Across Turkish factories, time-attendance turnstiles (PDKS) frequently run on standalone Perkotek SQL databases or embedded Firebird (.fdb) servers paired with quality-system polyvalence skill matrices (polivalans matrisi).
Querying raw Firebird or Perkotek personnel tables directly still risks leaking biometric template hashes, home addresses, or medical excuse notes. Instead, the ontology publishes two sanitized operational objects:
- Shift-clipped work-center attendance counts: live present-versus-scheduled headcount grouped by plant zone, shift code, and work center, stripped of biometric templates, national ID numbers, and medical absence reasons.
- Certified operator polyvalence matrices: active machine-operation certifications (such as Level 3 press setup or certified
TIGwelding) joined to shift presence so planners can staff urgent orders without exposing a single lira of personal pay.