Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Latest commit

 

History

History
22 lines (15 loc) · 745 Bytes

web-security.md

File metadata and controls

22 lines (15 loc) · 745 Bytes

z/OS Security

Authentication

The REST API service is protected by HTTP Basic authentication that is connected to ZosAuthenticationProvider.

The REST API endpoints that require HTTP Basic authentication have declare it in the @ApiOperation annotation. This annotation is used only for API documentation.

```java
import static org.zowe.sample.apiservice.apidoc.ApiDocConstants.DOC_SCHEME_BASIC_AUTH;

@ApiOperation(..., authorizations = { @Authorization(value = DOC_SCHEME_BASIC_AUTH) })
@GetMapping("/greeting")
public Greeting greeting(
```

The real protection by the authentication is configured in WebSecurityConfig class:

```java
http.authorizeRequests().anyRequest().authenticated();
```