Translate

Sunday, 21 December 2025

14 Explain MAC,Dac in detail

 Here is a detailed explanation of both access control models, complete with real-world examples to clarify how they function in different environments.


Explain MAC,Dac in detail vlrtraining


1. Discretionary Access Control (DAC)

Concept:

Discretionary Access Control (DAC) is a security model where the owner of the resource (like a file, folder, or database entry) decides who can access it.1 The "discretion" lies with the user; they can transfer ownership or grant permissions to others without needing approval from a central administrator.

This is the most common model used in consumer operating systems (like Windows and macOS) and social platforms.

3 Real-World Examples of DAC

Example 1: Google Drive / Cloud Storage

  • Scenario: You create a document named "Project Plan" in your Google Drive. You are the Owner.

  • The Action: You decide to share this file with your colleague, Sarah, giving her "Editor" access so she can make changes. You share the same file with a client, but give them "Viewer" access only.

  • Why this is DAC: You (the owner) arbitrarily decided who gets access and what kind of access they get.2 The system administrator at Google didn't have to intervene.

Example 2: Social Media Privacy Settings

  • Scenario: You post a photo on Facebook or Instagram.

  • The Action: You set the privacy setting for that specific photo to "Friends Only." For another post, you set it to "Public."

  • Why this is DAC: You are the creator (owner) of the content. You have the discretion to block strangers or allow everyone to see it.

Example 3: Windows/Linux File Systems

  • Scenario: On a shared family computer running Windows, you have a folder named "My Diary."

  • The Action: You right-click the folder, go to Properties, and uncheck the permissions for "Guest User." Now, when your sibling logs in as a Guest, they cannot open your folder.

  • Why this is DAC: The operating system allows you, the file creator, to modify the Access Control List (ACL) to include or exclude other users on the same machine.


2. Mandatory Access Control (MAC)

Concept:

Mandatory Access Control (MAC) is a strict, non-discretionary model where the Operating System (or a central administrator) controls access based on rigid policies.3 Users cannot change these permissions, even if they created the file.

MAC relies on Labels and Clearance:

  • Subjects (Users): Are given a "Security Clearance" (e.g., Top Secret).

  • Objects (Files): Are given a "Sensitivity Label" (e.g., Secret).

The Golden Rule: A user can only access a resource if their Clearance $\ge$ The Resource Label.

3 Real-World Examples of MAC

Example 1: Military Intelligence (The Classic Model)

  • Scenario: A military database contains information on troop movements.

  • The Setup:

    • File A: Labeled "Top Secret".

    • User 1 (General): Has "Top Secret" clearance.

    • User 2 (Lieutenant): Has "Confidential" clearance.

  • The Action: The Lieutenant creates a file summarizing a mission. The system automatically tags it as "Confidential" based on the terminal he is using. Even if he wants to share it with a civilian (Unclassified), the system forbids it. The General can read the Lieutenant's file (because Top Secret > Confidential), but the Lieutenant cannot open the General's "Top Secret" files.

Example 2: Secure Operating Systems (SELinux / AppArmor)

  • Scenario: A web server running on a Linux machine with SELinux (MAC) enabled.

  • The Setup: The system policy states that the "Apache Web Server" process can only read files in the /var/www/html directory and write to /var/log/httpd.

  • The Action: A hacker compromises the web server and tries to make it read the password file at /etc/shadow.

  • Why this is MAC: Even if the hacker has "root" (admin) privileges over the web server application, the underlying MAC kernel policy blocks the access because the "Web Server Label" does not have permission to touch the "Password File Label." The hacker is locked out by the system policy.

Example 3: Compartmentalized Corporate Research

  • Scenario: A tech giant like Apple or Google working on two secret projects: "Project X" and "Project Y."

  • The Setup:

    • Engineer A: Assigned to Project X.

    • Engineer B: Assigned to Project Y.

  • The Action: Engineer A wants to email a design file to Engineer B to ask for advice.

  • Why this is MAC: The system detects the file is tagged "Project X Data." It checks Engineer B's profile and sees they do not have the "Project X" label. The email is blocked automatically. Engineer A has no power (discretion) to override this; only the Chief Security Officer can change the labels.


Summary Comparison

FeatureDiscretionary Access Control (DAC)Mandatory Access Control (MAC)
Who controls access?The Resource Owner.The System Administrator / Policy.
FlexibilityHigh (Easy to share data).Low (Rigid and restrictive).
Security LevelLower (Prone to user error).Very High (Prevents data leaks).
Typical UseHome PCs, Small Business, Cloud.Military, Government, High-Security Servers.








ఇక్కడ మాండేటరీ యాక్సెస్ కంట్రోల్ (MAC) మరియు డిస్క్రిషనరీ యాక్సెస్ కంట్రోల్ (DAC) గురించి పూర్తి వివరాలు మరియు ఉదాహరణలతో కూడిన తెలుగు అనువాదం ఉంది:


Explain MAC,Dac in detail vlr training in telugu



1. డిస్క్రిషనరీ యాక్సెస్ కంట్రోల్ (DAC)

భావన (Concept): డిస్క్రిషనరీ యాక్సెస్ కంట్రోల్ (DAC) అనేది ఒక భద్రతా నమూనా. ఇందులో ఒక వనరు (ఫైల్, ఫోల్డర్ లేదా డేటాబేస్ ఎంట్రీ వంటివి) యొక్క యజమాని (Owner), దాన్ని ఎవరు యాక్సెస్ చేయాలో నిర్ణయిస్తారు. ఇక్కడ "డిస్క్రిషనరీ" (Discretionary) అంటే వినియోగదారుని ఇష్టం లేదా విచక్షణ అని అర్థం. యజమాని తమ ఫైల్ యాజమాన్యాన్ని ఇతరులకు బదిలీ చేయవచ్చు లేదా సెంట్రల్ అడ్మినిస్ట్రేటర్ అనుమతి లేకుండా ఇతరులకు పర్మిషన్లు ఇవ్వవచ్చు.

విండోస్ (Windows), మాక్ (macOS) వంటి సాధారణ ఆపరేటింగ్ సిస్టమ్‌లలో మరియు సోషల్ మీడియాలో ఇది ఎక్కువగా ఉపయోగించబడుతుంది.

DAC యొక్క 3 వాస్తవ ప్రపంచ ఉదాహరణలు

ఉదాహరణ 1: గూగుల్ డ్రైవ్ / క్లౌడ్ స్టోరేజ్ (Google Drive)

  • సందర్భం: మీరు మీ గూగుల్ డ్రైవ్‌లో "Project Plan" అనే ఒక డాక్యుమెంట్‌ను క్రియేట్ చేశారు. దానికి మీరే యజమాని (Owner).

  • చర్య: మీరు ఆ ఫైల్‌ను మీ కొలీగ్ అయిన 'సారా'తో షేర్ చేస్తూ, ఆమె మార్పులు చేయడానికి వీలుగా "Editor" యాక్సెస్ ఇచ్చారు. అదే ఫైల్‌ను ఒక క్లయింట్‌తో షేర్ చేస్తూ, కేవలం చూసేందుకు "Viewer" యాక్సెస్ మాత్రమే ఇచ్చారు.

  • ఇది DAC ఎందుకు: ఇక్కడ ఎవరికి ఏ పర్మిషన్ ఇవ్వాలనేది పూర్తిగా మీ (యజమాని) ఇష్టం. దీనికి గూగుల్ అడ్మినిస్ట్రేటర్ జోక్యం అవసరం లేదు.

ఉదాహరణ 2: సోషల్ మీడియా ప్రైవసీ సెట్టింగులు

  • సందర్భం: మీరు ఫేస్‌బుక్ (Facebook) లేదా ఇన్‌స్టాగ్రామ్‌లో ఒక ఫోటోను పోస్ట్ చేశారు.

  • చర్య: ఆ ఒక్క ఫోటోకి మాత్రమే మీరు ప్రైవసీ సెట్టింగ్‌ను "Friends Only" (స్నేహితులకు మాత్రమే) అని పెట్టారు. మరొక పోస్ట్‌కి "Public" (అందరికీ) అని పెట్టారు.

  • ఇది DAC ఎందుకు: ఆ కంటెంట్‌ను సృష్టించింది మీరే కాబట్టి, దాన్ని ఎవరు చూడాలి, ఎవరు చూడకూడదు అనేది నిర్ణయించే స్వేచ్ఛ మీకే ఉంటుంది.

ఉదాహరణ 3: విండోస్/లైనక్స్ ఫైల్ సిస్టమ్స్ (PC)

  • సందర్భం: విండోస్ ఉన్న ఒక ఇంటి కంప్యూటర్‌లో మీకు "My Diary" అనే ఫోల్డర్ ఉంది.

  • చర్య: మీరు ఆ ఫోల్డర్ మీద రైట్ క్లిక్ చేసి, ప్రాపర్టీస్‌లోకి వెళ్లి, "Guest User" (అతిథి వినియోగదారు) యొక్క పర్మిషన్లను తీసివేశారు. ఇప్పుడు మీ సోదరుడు/సోదరి గెస్ట్‌గా లాగిన్ అయినప్పుడు, వారు ఆ ఫోల్డర్‌ను తెరవలేరు.

  • ఇది DAC ఎందుకు: ఆపరేటింగ్ సిస్టమ్ ఫైల్ సృష్టికర్త అయిన మిమ్మల్ని, ఇతరులకు పర్మిషన్లు ఇవ్వడానికి లేదా నిరాకరించడానికి అనుమతిస్తుంది.


2. మాండేటరీ యాక్సెస్ కంట్రోల్ (MAC)

భావన (Concept): మాండేటరీ యాక్సెస్ కంట్రోల్ (MAC) అనేది కఠినమైన భద్రతా నమూనా. ఇందులో ఆపరేటింగ్ సిస్టమ్ (లేదా సెంట్రల్ అడ్మినిస్ట్రేటర్) కఠినమైన విధానాల (policies) ఆధారంగా యాక్సెస్‌ను నియంత్రిస్తుంది. ఫైల్ సృష్టించిన యూజర్ అయినా సరే, ఈ పర్మిషన్లను మార్చలేరు.

MAC పూర్తిగా లేబుల్స్ (Labels) మరియు క్లియరెన్స్ (Clearance) మీద ఆధారపడి పనిచేస్తుంది:

  • సబ్జెక్ట్స్ (వినియోగదారులు): వీరికి "సెక్యూరిటీ క్లియరెన్స్" (ఉదా: టాప్ సీక్రెట్) ఇవ్వబడుతుంది.

  • ఆబ్జెక్ట్స్ (ఫైల్స్): వీటికి "సెన్సిటివిటీ లేబుల్" (ఉదా: సీక్రెట్) ఇవ్వబడుతుంది.

ప్రధాన నియమం: ఒక యూజర్ ఫైల్‌ను యాక్సెస్ చేయాలంటే, వారి 'క్లియరెన్స్' ఆ ఫైల్ యొక్క 'లేబుల్' కంటే ఎక్కువగాని లేదా సమానంగాని () ఉండాలి.

MAC యొక్క 3 వాస్తవ ప్రపంచ ఉదాహరణలు

ఉదాహరణ 1: మిలిటరీ ఇంటెలిజెన్స్ (సాంప్రదాయ పద్ధతి)

  • సందర్భం: సైనిక కదలికలకు సంబంధించిన సమాచారం ఒక మిలిటరీ డేటాబేస్‌లో ఉంది.

  • అమరిక:

    • ఫైల్ A: "Top Secret" (అత్యంత రహస్యం) అని లేబుల్ చేయబడింది.

    • యూజర్ 1 (జనరల్): ఇతనికి "Top Secret" క్లియరెన్స్ ఉంది.

    • యూజర్ 2 (లెఫ్టినెంట్): ఇతనికి "Confidential" (గోప్యమైన) క్లియరెన్స్ ఉంది.

  • చర్య: లెఫ్టినెంట్ ఒక మిషన్ గురించి ఫైల్ రాస్తాడు. అతను వాడుతున్న కంప్యూటర్ స్థాయిని బట్టి సిస్టమ్ దానికి "Confidential" అని ఆటోమేటిక్‌గా లేబుల్ వేస్తుంది. అతను ఆ ఫైల్‌ను సాధారణ పౌరులకు (Unclassified) పంపాలనుకున్నా, సిస్టమ్ ఒప్పుకోదు. జనరల్, లెఫ్టినెంట్ ఫైల్‌ను చూడగలడు (ఎందుకంటే Top Secret > Confidential కాబట్టి), కానీ లెఫ్టినెంట్ మాత్రం జనరల్ యొక్క "Top Secret" ఫైళ్లను తెరవలేడు.

ఉదాహరణ 2: సురక్షిత ఆపరేటింగ్ సిస్టమ్స్ (SELinux / AppArmor)

  • సందర్భం: ఒక లైనక్స్ (Linux) కంప్యూటర్‌లో వెబ్ సర్వర్ రన్ అవుతోంది, అందులో SELinux (MAC) ఎనేబుల్ చేసి ఉంది.

  • అమరిక: "అపాచీ వెబ్ సర్వర్" (Apache Web Server) కేవలం /var/www/html అనే ఫోల్డర్‌ను మాత్రమే చూడాలి అని సిస్టమ్ పాలసీ చెబుతుంది.

  • చర్య: ఒక హ్యాకర్ వెబ్ సర్వర్‌ను హ్యాక్ చేసి, /etc/shadow లో ఉన్న పాస్‌వర్డ్ ఫైల్‌ను దొంగలించడానికి ప్రయత్నిస్తాడు.

  • ఇది MAC ఎందుకు: హ్యాకర్‌కు అడ్మిన్ (root) పర్మిషన్లు వచ్చినా సరే, సిస్టమ్ యొక్క MAC పాలసీ ఆ యాక్సెస్‌ను అడ్డుకుంటుంది. ఎందుకంటే "వెబ్ సర్వర్ లేబుల్"కు "పాస్‌వర్డ్ ఫైల్ లేబుల్"ను తాకే అనుమతి లేదు.

ఉదాహరణ 3: కార్పొరేట్ రీసెర్చ్ విభజన

  • సందర్భం: గూగుల్ లేదా ఆపిల్ వంటి పెద్ద కంపెనీ రెండు రహస్య ప్రాజెక్టులపై పనిచేస్తోంది: "ప్రాజెక్ట్ X" మరియు "ప్రాజెక్ట్ Y".

  • అమరిక:

    • ఇంజనీర్ A: "ప్రాజెక్ట్ X" లో పని చేస్తున్నారు.

    • ఇంజనీర్ B: "ప్రాజెక్ట్ Y" లో పని చేస్తున్నారు.

  • చర్య: ఇంజనీర్ A, ఒక డిజైన్ ఫైల్‌ను సలహా కోసం ఇంజనీర్ B కి ఈమెయిల్ చేయాలనుకుంటున్నారు.

  • ఇది MAC ఎందుకు: ఆ ఫైల్ "ప్రాజెక్ట్ X డేటా" అని సిస్టమ్ గుర్తిస్తుంది. ఇంజనీర్ B ప్రొఫైల్‌ను చెక్ చేసినప్పుడు, అతనికి "ప్రాజెక్ట్ X" లేబుల్ లేదని తెలుస్తుంది. వెంటనే ఆ ఈమెయిల్ ఆటోమేటిక్‌గా బ్లాక్ చేయబడుతుంది. దీన్ని మార్చే అధికారం ఇంజనీర్ A కి (డిస్క్రిషనరీ) ఉండదు; కేవలం చీఫ్ సెక్యూరిటీ ఆఫీసర్ మాత్రమే లేబుల్స్ మార్చగలరు.


పోలికల పట్టిక (Summary Comparison)

లక్షణం (Feature)డిస్క్రిషనరీ యాక్సెస్ కంట్రోల్ (DAC)మాండేటరీ యాక్సెస్ కంట్రోల్ (MAC)
యాక్సెస్‌ను ఎవరు నియంత్రిస్తారు?వనరు యొక్క యజమాని (Owner).సిస్టమ్ అడ్మినిస్ట్రేటర్ / పాలసీ.
ఫ్లెక్సిబిలిటీ (సరళత)ఎక్కువ (డేటా షేర్ చేయడం సులభం).తక్కువ (కఠినమైనది మరియు నియంత్రితమైనది).
భద్రతా స్థాయి (Security Level)తక్కువ (యూజర్లు తప్పు చేసే అవకాశం ఉంది).చాలా ఎక్కువ (డేటా లీక్‌లను నివారిస్తుంది).
సాధారణ వినియోగంఇంటి PCలు, చిన్న వ్యాపారాలు, క్లౌడ్.మిలిటరీ, ప్రభుత్వం, హై-సెక్యూరిటీ సర్వర్లు.