Settings file database.yml¶
Overview¶
The file stores core CLI users settings and server applications settings. The database.yml file is a text file in YAML markup language, for example:
users:
admin: {username: admin, password: 21232f297a57a5a743894a0e4a801fc3, active: true}
demo: {username: demo, password: fe01ce2a7fbac8fafaed7c982a04e229, active: true}
apps:
flashStreamingApp: {name: flashStreamingApp, key: flashStreamingApp, url: 'http://localhost:9091/EchoApp',
handler: com.flashphoner.server.client.handler.wcs4.FlashStreamingHandler, callback: com.flashphoner.server.client.handler.wcs4.FlashStreamingCallbackHandler}
conferenceApp: {name: conferenceApp, key: conferenceApp, url: 'http://localhost:9091/ConferenceApp',
handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler, callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
flashChatApp: {name: flashChatApp, key: flashChatApp, url: 'http://localhost:9091/ChatApp',
handler: com.flashphoner.server.client.handler.wcs4.FlashStreamingHandler, callback: com.flashphoner.server.client.handler.wcs4.FlashStreamingCallbackHandler}
clickToCallApp: {name: clickToCallApp, key: clickToCallApp, url: 'http://localhost:9091/ClickToCallApp',
handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler, callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
flashRoomApp: {name: chatRoomApp, key: flashRoomApp, url: 'http://localhost:9091/RoomApp',
handler: com.flashphoner.server.client.handler.wcs4.FlashRoomHandler, callback: com.flashphoner.server.client.handler.wcs4.FlashStreamingCallbackHandler}
callApp: {name: callApp, key: callApp, url: 'http://localhost:9091/CallApp', handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler,
callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
defaultApp: {name: defaultApp, key: defaultApp, url: 'http://localhost:9091/EchoApp',
handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler, callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
websocketChatApp: {name: websocketChatApp, key: websocketChatApp, url: 'http://localhost:9091/ChatApp',
handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler, callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
roomApp: {name: chatRoomApp, key: roomApp, url: 'http://localhost:9091/RoomApp',
handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler, callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
chatRoomApp: {name: chatRoomApp, key: chatRoomApp, url: 'http://localhost:9091/ChatRoomApp',
handler: com.flashphoner.server.client.handler.wcs4.WCS4Handler, callback: com.flashphoner.server.client.handler.wcs4.WCS4CallbackHandler}
The file can be modified manually if necessary, however it is recommended to use appropriate core CLI commands for this purpose.
User authorities¶
Since build 5.3.503, the user authorities lists are written for each user except admins:
users:
admin: {username: admin, password: 21232f297a57a5a743894a0e4a801fc3, active: true}
demo: {username: demo, password: fe01ce2a7fbac8fafaed7c982a04e229, active: true, authorities: [SETTINGS_UPDATE, SAMPLES]}
...
apps:
...
The authorities protect a various REST API operations:
| Authority | Operation allowed | API |
|---|---|---|
| CERTIFICATE | SSL certificates update | /rest-api/v3/certificate |
| CONFIG | Raw configuration files update | /rest-api/v3/config |
| FILE_SYSTEM | File system access (inside WCS workdir only) | /rest-api/v3/file-system-controller |
| LOGS | Log files reading | /rest-api/v3/log |
| PROCESS_CONTROL | WCS main process start/stop/restart | /rest-api/v3/process |
| SAMPLES | Example applications access via web admin interface | |
| SETTINGS | WCS settings reading from flashphoner.properties file |
/rest-api/v3/settings |
| SETTINGS_UPDATE | WCS settings updating from flashphoner.properties file |
/rest-api/v3/settings |
| USER | WCS users management | /rest-api/v3/user |
Admin users (admin and restAdmin) have all possible privileges.
The desired authorities should be set while creating or updating a user via CLI or REST API /rest-api/v3/user.
database.yml versioning and migration¶
database.yml file versioning is added since build 5.3.503 to provide a smooth migration from a previous WCS builds.
The current version is stored in database.yml.version file. The migration affects users descriptions section only, REST hook apps section stays intouched.
The users description may be migrated automatically while installing a new WCS build over a previous one, or manually with the following command
The previous database.yml file is copied before applying the changes, for example database.yml.v1.0.20261104082636.bak. The backup copy may be used while rolling back to the previous WCS build.