您好,欢迎访问三七文档
Chapter14:Protection14.2Chapter14:ProtectionGoalsofProtectionPrinciplesofProtectionDomainofProtectionAccessMatrixImplementationofAccessMatrixAccessControlRevocationofAccessRightsCapability-BasedSystemsLanguage-BasedProtection14.3ObjectivesDiscussthegoalsandprinciplesofprotectioninamoderncomputersystemExplainhowprotectiondomainscombinedwithanaccessmatrixareusedtospecifytheresourcesaprocessmayaccessExaminecapabilityandlanguage-basedprotectionsystems14.4GoalsofProtectionOperatingsystemconsistsofacollectionofobjects,hardwareorsoftwareEachobjecthasauniquenameandcanbeaccessedthroughawell-definedsetofoperations.Protectionproblem-ensurethateachobjectisaccessedcorrectlyandonlybythoseprocessesthatareallowedtodoso.14.5PrinciplesofProtectionGuidingprinciple–principleofleastprivilegePrograms,usersandsystemsshouldbegivenjustenoughprivilegestoperformtheirtasks14.6DomainStructureAccess-right=object-name,rights-setwhererights-setisasubsetofallvalidoperationsthatcanbeperformedontheobject.Domain=setofaccess-rights14.7DomainImplementation(UNIX)Systemconsistsof2domains:UserSupervisorUNIXDomain=user-idDomainswitchaccomplishedviafilesystem.Eachfilehasassociatedwithitadomainbit(setuidbit).Whenfileisexecutedandsetuid=on,thenuser-idissettoownerofthefilebeingexecuted.Whenexecutioncompletesuser-idisreset.14.8DomainImplementation(MULTICS)LetDiandDjbeanytwodomainrings.IfjIDiDj14.9AccessMatrixViewprotectionasamatrix(accessmatrix)RowsrepresentdomainsColumnsrepresentobjectsAccess(i,j)isthesetofoperationsthataprocessexecutinginDomainicaninvokeonObjectj14.10AccessMatrix14.11UseofAccessMatrixIfaprocessinDomainDitriestodo“op”onobjectOj,then“op”mustbeintheaccessmatrix.Canbeexpandedtodynamicprotection.Operationstoadd,deleteaccessrights.Specialaccessrights:ownerofOicopyopfromOitoOjcontrol–DicanmodifyDjaccessrightstransfer–switchfromdomainDitoDj14.12UseofAccessMatrix(Cont.)Accessmatrixdesignseparatesmechanismfrompolicy.MechanismOperatingsystemprovidesaccess-matrix+rules.Ifensuresthatthematrixisonlymanipulatedbyauthorizedagentsandthatrulesarestrictlyenforced.PolicyUserdictatespolicy.Whocanaccesswhatobjectandinwhatmode.14.13ImplementationofAccessMatrixEachcolumn=Access-controllistforoneobjectDefineswhocanperformwhatoperation.Domain1=Read,WriteDomain2=ReadDomain3=ReadEachRow=CapabilityList(likeakey)Foreeachdomain,whatoperationsallowedonwhatobjects.Object1–ReadObject4–Read,Write,ExecuteObject5–Read,Write,Delete,Copy14.14AccessMatrixofFigureAWithDomainsasObjectsFigureB14.15AccessMatrixwithCopyRights14.16AccessMatrixWithOwnerRights14.17ModifiedAccessMatrixofFigureB14.18AccessControlProtectioncanbeappliedtonon-fileresourcesSolaris10providesrole-basedaccesscontroltoimplementleastprivilegePrivilegeisrighttoexecutesystemcalloruseanoptionwithinasystemcallCanbeassignedtoprocessesUsersassignedrolesgrantingaccesstoprivilegesandprograms14.19Role-basedAccessControlinSolaris1014.20RevocationofAccessRightsAccessList–Deleteaccessrightsfromaccesslist.SimpleImmediateCapabilityList–Schemerequiredtolocatecapabilityinthesystembeforecapabilitycanberevoked.ReacquisitionBack-pointersIndirectionKeys14.21Capability-BasedSystemsHydraFixedsetofaccessrightsknowntoandinterpretedbythesystem.Interpretationofuser-definedrightsperformedsolelybyuser'sprogram;systemprovidesaccessprotectionforuseoftheserights.CambridgeCAPSystemDatacapability-providesstandardread,write,executeofindividualstoragesegmentsassociatedwithobject.Softwarecapability-interpretationlefttothesubsystem,throughitsprotectedprocedures.14.22Language-BasedProtectionSpecificationofprotectioninaprogramminglanguageallowsthehigh-leveldescriptionofpoliciesfortheallocationanduseofresources.Languageimplementationcanprovidesoftwareforprotectionenforcementwhenautomatichardware-supportedcheckingisunavailable.Interpretprotectionspecificationstogeneratecallsonwhateverprotectionsystemisprovidedbythehardwareandtheoperatingsystem.14.23ProtectioninJava2ProtectionishandledbytheJavaVirtualMachine(JVM)AclassisassignedaprotectiondomainwhenitisloadedbytheJVM.Theprotectiondomainindicateswhatoperationstheclasscan(andcannot)perform.Ifalibrarymethodisinvokedthatperformsaprivilegedoperation,thestackisinspectedtoensuretheoperationcanbeperformedbythelibrary.14.24StackInspectionEndofChapter14
本文标题:operating system《操作系统》ch14-protection-25
链接地址:https://www.777doc.com/doc-3373966 .html