web = Server("Web Server") web.OS = "CloudOS" web.isHardened = True db = Datastore("SQL Database (*)") db.OS = "CentOS" db.isHardened = False db.inBoundary = Web_DB db.isSql = True db.inScope = False user_to_web = Dataflow(user, web, "User enters comments (*)") user_to_web.protocol = "HTTP" user_to_web.dstPort = 80 user_to_web.data = 'Comments in HTML or Markdown' user_to_web.order = 1 user_to_web.note = "This is a note\nmulti-line" web_to_user = Dataflow(web, user, "Comments saved (*)") web_to_user.protocol = "HTTP" web_to_user.data = 'Ack of saving or error message, in JSON' web_to_user.order = 2 web_to_db = Dataflow(web, db, "Insert query with comments") web_to_db.protocol = "MySQL" web_to_db.dstPort = 3306 web_to_db.data = 'MySQL insert statement, all literals' web_to_db.order = 3 web_to_db.note = "another note\nin a different place" db_to_web = Dataflow(db, web, "Comments contents")
db_search.inBoundary = DB db_search.inScope = True db_search.authenticatesSource = True db_rating = Datastore("Ratings") db_rating.inBoundary = DB db_rating.inScope = False db_reservations = Datastore("Reservations") db_reservations.inBoundary = DB db_reservations.inScope = False # Define flows search_user_to_api = Dataflow(user, api_search, "User enters search") search_user_to_api.isEncrypted = True #JIRA TEST-0001 search_user_to_api.order =1 search_api_to_db = Dataflow(api_search, db_search, "Search critirea") search_api_to_db.order = 2 search_db_to_api = Dataflow(db_search, api_search, "Results") search_db_to_api.order = 3 search_api_to_user = Dataflow(api_search, user, "Results") search_api_to_user.order = 4 reservation_user_to_api = Dataflow(user, api_reservation, "User enters reservation") reservation_user_to_api.isEncrypted = True reservation_user_to_api.order =5 reservation_api_to_db = Dataflow(api_reservation, db_reservations, "Check availability") reservation_api_to_db.order = 6 reservation_db_to_api = Dataflow(db_reservations, api_reservation, "Returns availability") reservation_db_to_api.order = 7 reservation_api_to_user = Dataflow(api_reservation, user, "Reservation status")