CGI interview question

How do you secure access to a resource in spring?