CGI Interview Question

How do you secure access to a resource in spring?