The smart spaces built on the ubiquitous network make the services available for every entity in a seamless way using the most suitable resource provider. However, all services are not equally sensitive; hence do not require the same levels of security. In this paper, the authors propose an adaptive security scheme which handles service requests originating from heterogeneous contexts and belonging to different trust levels. The adaptive security scheme includes user classification, situational analysis and dynamic generation of appropriate security policies. The proposed security scheme can be made use to secure application built on the Ubiquitous Computing Environment (UCE) such as health care, smart office, smart ubiquitous home, etc.