1. A system for automatically creating a security access policy to an electronic document in a document management system, the system comprising: a processor; and a non-transitory computer readable storage medium, having computer readable instructions stored thereon for execution by the processor, causing the processor to: associate metadata with the document, the metadata comprising one or more attributes of the document; the metadata comprising: a contextual metadata, which is inferred from contents of the document; an applied metadata, which is attached to the document by an external program; and a dynamic metadata, which is dynamically retrieved based on external content analysis of the document performed outside of the document management system; configure security access policies to be applied to documents in the document management system, comprising specifying one or more metadata rules operating on the metadata and governing application of security access policies to the documents; and determine the security access policy to be applied to the document to be added to the document management system based on the one or more metadata rules and the metadata associated with the document.